mastertasks, subtasks - GET, POST, DELETE

This commit is contained in:
StudioTem committed 2023-01-31 17:19:45 +01:00
1 parent 96954845a1
commit a79add193c
12 files changed
+284 -2

No files matched your search

+8
View File
@@ -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();
}
}
+1
View File
@@ -10,6 +10,7 @@ class SubTask extends Model
use HasFactory;
public $timestamps = true;
public $guarded = ['id'];
public function mastertask()
{