ldc-legaulois/app/Http/Requests/Bo/UploadFileRequest.php
2026-09-25 16:25:31 +02:00

26 lines
544 B
PHP

<?php
namespace App\Http\Requests\Bo;
use Illuminate\Foundation\Http\FormRequest;
class UploadFileRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return auth('backend')->check() and $this->ajax();
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'upload' => 'required|image|mimes:jpeg,png,jpg|max:2048',
];
}
}