2022-04-04 18:28:55 +02:00
|
|
|
<?php
|
|
|
|
|
|
2022-06-20 14:57:58 +02:00
|
|
|
namespace App\Http\Requests\Bo\Ajax;
|
2022-04-04 18:28:55 +02:00
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
2022-06-20 14:57:58 +02:00
|
|
|
class UploadMediaFileRequest extends FormRequest
|
2022-04-04 18:28:55 +02:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
|
|
|
|
* @return boolean
|
|
|
|
|
*/
|
|
|
|
|
public function authorize()
|
|
|
|
|
{
|
|
|
|
|
return auth()->check();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
2022-06-20 14:57:58 +02:00
|
|
|
* @return array<string, mixed>
|
2022-04-04 18:28:55 +02:00
|
|
|
*/
|
|
|
|
|
public function rules()
|
|
|
|
|
{
|
|
|
|
|
return [
|
2022-06-20 14:57:58 +02:00
|
|
|
'media_id' => 'nullable|exists:media,id',
|
|
|
|
|
'dossier_id' => 'sometimes|exists:dossiers,id'
|
2022-04-04 18:28:55 +02:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|