ldc-crm/app/Http/Requests/Bo/Answers/StoreAnswerRequest.php
2023-10-06 16:37:30 +02:00

42 lines
815 B
PHP

<?php
namespace App\Http\Requests\Bo\Answers;
use Illuminate\Foundation\Http\FormRequest;
class StoreAnswerRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize(): bool
{
return auth('backend')->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
return [
'answer' => 'required|string|min:1|max:255',
];
}
/**
* Get custom attributes for validator errors.
*
* @return array
*/
public function attributes(): array
{
return [
'answer' => trans('Réponse à une question'),
];
}
}