mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
27 lines
509 B
PHP
27 lines
509 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Blocker extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public $timestamps = true;
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class)->withTrashed();
|
|
}
|
|
|
|
public function getColorAttribute()
|
|
{
|
|
// TODO - zistit ci sa maju lisit farby
|
|
return $this->type == 'adhoc' ? '#B00020' : '#B00020';
|
|
}
|
|
}
|