License::factory(), ]; } public function assignedToUser(User $user = null) { return $this->state(function () use ($user) { return [ 'assigned_to' => $user->id ?? User::factory(), ]; }); } }