File: /var/www/ipsremont-demo/app/Http/Requests/Service/IndexServiceRequest.php
<?php
namespace App\Http\Requests\Service;
use App\Http\Requests\Request;
use App\Models\Service\Service;
use Illuminate\Validation\Rule;
class IndexServiceRequest extends Request
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
return [
'sortable' => 'boolean',
'field' => Rule::in(Service::getSortableFields()),
'sort' => Rule::in(['asc', 'desc']),
'email' => ['string', 'nullable'],
'name' => ['string', 'nullable'],
'manager_id' => ['integer', 'nullable'],
'branch_id' => ['integer', 'nullable'],
];
}
}