Level 50
What is the error exactly?
Hi, I have one confusion. I have 2 models: User and Group. Group have user_id which means owner of this group. I fill this ID in GroupObserver in creating function
$group->user()->associate(Auth::user());
I have problem because it will fail:
factory(\App\Models\Group::class, 10)->create();
while seeding there is not logged user. I assigned user to group in GroupFactory and disable all events on Group model but I think there's a better way to workarround this problem.
Please or to participate in this conversation.