37 lines
716 B
PHP
37 lines
716 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\API;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class DocumentUploadRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'file' => 'required|file|mimes:jpg,pdf,png,zip',
|
|
];
|
|
}
|
|
|
|
// protected function prepareForValidation(): void
|
|
// {
|
|
// $this->merge(json_decode($this->payload, true, 512, JSON_THROW_ON_ERROR));
|
|
// }
|
|
}
|