2022-04-04 18:28:55 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Bo;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
2022-06-20 14:57:58 +02:00
|
|
|
class DownloadMediaRequest extends FormRequest
|
2022-04-04 18:28:55 +02:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
|
|
|
|
* @return boolean
|
|
|
|
|
*/
|
2022-06-20 14:57:58 +02:00
|
|
|
public function authorize(): bool
|
2022-04-04 18:28:55 +02:00
|
|
|
{
|
|
|
|
|
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
|
|
|
'mediaList' => 'required|array',
|
|
|
|
|
'mediaList.*' => 'required|exists:media,id',
|
2022-04-04 18:28:55 +02:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|