27 lines
676 B
PHP
27 lines
676 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\DocumentTemplate;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class IndexRequest extends FormRequest
|
||
|
|
{
|
||
|
|
public function authorize(): bool
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'is_active' => 'nullable|boolean',
|
||
|
|
'category' => 'nullable|string|max:50',
|
||
|
|
'search' => 'nullable|string|max:100',
|
||
|
|
'sort_by' => 'nullable|string|in:created_at,name,category',
|
||
|
|
'sort_dir' => 'nullable|string|in:asc,desc',
|
||
|
|
'per_page' => 'nullable|integer|min:1|max:100',
|
||
|
|
'page' => 'nullable|integer|min:1',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|