26 lines
719 B
PHP
26 lines
719 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\UserInvitation;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class ListInvitationRequest extends FormRequest
|
||
|
|
{
|
||
|
|
public function authorize(): bool
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'status' => ['nullable', 'string', 'in:pending,accepted,expired,cancelled'],
|
||
|
|
'search' => ['nullable', 'string', 'max:255'],
|
||
|
|
'sort_by' => ['nullable', 'string', 'in:created_at,expires_at,email'],
|
||
|
|
'sort_dir' => ['nullable', 'string', 'in:asc,desc'],
|
||
|
|
'per_page' => ['nullable', 'integer', 'min:1', 'max:100'],
|
||
|
|
'page' => ['nullable', 'integer', 'min:1'],
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|