$songs */ class AddSongsToPlaylistRequest extends Request { /** @return array */ public function rules(): array { return [ 'songs' => 'required|array', 'songs.*' => [Rule::exists(Song::class, 'id')], ]; } }