Files
SkinbaseNova/app/Http/Requests/Collections/SmartCollectionRulesRequest.php
2026-03-28 19:15:39 +01:00

26 lines
590 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests\Collections;
use Illuminate\Foundation\Http\FormRequest;
class SmartCollectionRulesRequest extends FormRequest
{
public function authorize(): bool
{
return $this->user() !== null;
}
public function rules(): array
{
return [
'smart_rules_json' => ['required', 'array'],
'smart_rules_json.match' => ['nullable', 'string'],
'smart_rules_json.sort' => ['nullable', 'string'],
'smart_rules_json.rules' => ['required', 'array'],
];
}
}