Can't seed created_by column while seeding tableCreated 6 years ago by lckamal
What should we do to seed created_by column? My seeder looks like this:
$this->teams->create( [ 'created_by' => UserModel::find(3), 'name' => $faker->company, 'no_players' => $faker->numberBetween(1,12), 'image' => FolderModel::where('slug', 'team')->first()->files()->inRandomOrder()->first()->id ] );
I have also tried
'created_by' => 3Both option didn't work.
ryanthompson — 6 years ago
Open an issue if you would this is being aggressively overrides it would seem.
did you try getting the created entry and modify it afterwards?