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