|int $playlists */ class PlaylistFolderPlaylistDestroyRequest extends Request { /** @return array */ public function rules(): array { return [ 'playlists' => [ 'required', 'array', new AllPlaylistsAreAccessibleBy($this->user()), Rule::exists(Playlist::class, 'id'), ], ]; } }