*/ public function rules(): array { return [ 'name' => 'required', 'rules' => ['array', 'nullable', new ValidSmartPlaylistRulePayload()], 'folder_id' => ['nullable', 'sometimes', Rule::exists(PlaylistFolder::class, 'id')], ]; } }