From d05007b21e338d1237b050daffdd5c7e3ffc47a0 Mon Sep 17 00:00:00 2001 From: aslan Date: Thu, 30 May 2024 16:52:51 +0300 Subject: [PATCH] fix project_id field in Label --- app/Models/Label.php | 2 +- database/migrations/2024_04_27_115604_create_labels_table.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Label.php b/app/Models/Label.php index bedc625..81403f5 100644 --- a/app/Models/Label.php +++ b/app/Models/Label.php @@ -13,7 +13,7 @@ class Label extends Model protected $fillable = [ 'id', 'name', - 'department_id', + 'project_id', 'created_by_id', ]; diff --git a/database/migrations/2024_04_27_115604_create_labels_table.php b/database/migrations/2024_04_27_115604_create_labels_table.php index 181af68..9082cab 100644 --- a/database/migrations/2024_04_27_115604_create_labels_table.php +++ b/database/migrations/2024_04_27_115604_create_labels_table.php @@ -11,7 +11,7 @@ return new class extends Migration Schema::create('labels', function (Blueprint $table) { $table->id(); $table->string('name', 255); - $table->foreignId('project_id')->constrained('projects'); + $table->foreignId('project_id')->nullable()->constrained('projects'); $table->timestamps(); }); }