Files
sam-api/app/Http/Requests/Audit/AuditLogIndexRequest.php

30 lines
859 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests\Audit;
use Illuminate\Foundation\Http\FormRequest;
class AuditLogIndexRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'page' => 'nullable|integer|min:1',
'size' => 'nullable|integer|min:1|max:200',
'target_type' => 'nullable|string|max:100',
'target_id' => 'nullable|integer|min:1',
'action' => 'nullable|string|max:50',
'actor_id' => 'nullable|integer|min:1',
'from' => 'nullable|date',
'to' => 'nullable|date|after_or_equal:from',
'sort' => 'nullable|string|in:created_at',
'order' => 'nullable|string|in:asc,desc',
];
}
}