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