$songs * @property string $name * @property array $rules */ class PlaylistStoreRequest extends Request { /** @return array */ public function rules(): array { return [ 'name' => 'required', 'songs' => 'array', 'songs.*' => [Rule::exists(Song::class, 'id')], 'rules' => ['array', 'nullable', new ValidSmartPlaylistRulePayload()], ]; } }