mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
mastertasks, subtasks - GET, POST, DELETE
This commit is contained in:
1 parent
96954845a1
commit
a79add193c
12 files changed
+284
-2
No files matched your search
@@ -10,6 +10,7 @@ class MasterTask extends Model
|
||||
use HasFactory;
|
||||
|
||||
public $timestamps = true;
|
||||
public $guarded = ['id'];
|
||||
|
||||
public function subtasks()
|
||||
{
|
||||
@@ -40,4 +41,11 @@ class MasterTask extends Model
|
||||
return !in_array($this->team->id, $user->teams->pluck('id')->unique()->toArray());
|
||||
});
|
||||
}
|
||||
|
||||
// TODO dorobit logiku
|
||||
public static function generateMasterTaskColor()
|
||||
{
|
||||
// return random value from array
|
||||
return collect(['#E9FFE5', '#F6ECD3', '#FDE1FF', '#FFC9C9', '#DADEF8', '#EDFFFE'])->random();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user