2021-09-14 10:58:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
2023-10-06 15:00:42 +02:00
|
|
|
namespace App\Http\Requests\Bo;
|
2021-09-14 10:58:00 +02:00
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
|
|
class QuestionExport extends FormRequest
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
2021-12-19 15:57:24 +01:00
|
|
|
* @return boolean
|
2021-09-14 10:58:00 +02:00
|
|
|
*/
|
2023-09-06 17:24:53 +02:00
|
|
|
public function authorize(): bool
|
2021-09-14 10:58:00 +02:00
|
|
|
{
|
2023-10-06 15:00:42 +02:00
|
|
|
return auth('backend')->check();
|
2021-09-14 10:58:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2023-09-06 17:24:53 +02:00
|
|
|
public function rules(): array
|
2021-09-14 10:58:00 +02:00
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'brand' => 'required|numeric|exists:brands,id'
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|