argument('playlistId'); /** @var Playlist|null $playlist */ $playlist = Playlist::query()->find($playlistId); if (! $playlist) { $this->error("Playlist with id $playlistId not found."); return 0; } return new FixPlaylistAction()->handle($playlist, $this); } protected function validator(): Validator { return ValidatorFacade::make($this->options(), [ 'playlistId' => ['int', 'required'], ]); } }