From c744ae1a2146285fa6c0c9f64ba7ac37e81540cb Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Thu, 14 Dec 2023 14:54:44 +0300 Subject: [PATCH] added comment seeder --- database/seeders/PlanCommentSeeder.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/database/seeders/PlanCommentSeeder.php b/database/seeders/PlanCommentSeeder.php index 949e3cc..8f4c844 100755 --- a/database/seeders/PlanCommentSeeder.php +++ b/database/seeders/PlanCommentSeeder.php @@ -15,29 +15,6 @@ class PlanCommentSeeder extends Seeder */ public function run(): void { - // $table->id(); - // $table->bigInteger('user_id'); - // $table->bigInteger('plan_id'); - // $table->smallInteger('grade')->default(0); - // $table->longText('body')->nullable(); - // $table->timestamps(); - // - // return [ - // 'user_id' => User::count() > 0 ? function(User::) - // 'plan_id' - // 'body' => $this->faker->text(), - // ]; - // - // public function author() - // { - // return $this->belongsTo(User::class, 'user_id'); - // } - - // public function plan() - // { - // return $this->belongsTo(Plan::class, 'plan_id'); - // } - if (User::count() > 0 && Plan::count() > 0) { $comments = PlanComment::factory()->count(5)->make(); @@ -56,7 +33,6 @@ class PlanCommentSeeder extends Seeder $comment->saveOrFail(); }); - } } }