ldc-gen-game-web/app/Http/Requests/Bo/GainViews/StoreGainViewRequest.php

45 lines
910 B
PHP
Raw Normal View History

2023-08-22 10:48:31 +02:00
<?php
namespace App\Http\Requests\Bo\GainViews;
use Illuminate\Foundation\Http\FormRequest;
class StoreGainViewRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize()
{
2023-11-30 11:37:17 +01:00
return auth('backend')->check();
2023-08-22 10:48:31 +02:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required|string|min:3|max:255',
'file_name' => 'required|string|min:3|max:255'
];
}
/**
* Get custom attributes for validator errors.
*
* @return array
*/
public function attributes(): array
{
return [
'name' => trans('Nom de la page de gain'),
'file_name' => trans('Nom du fchier'),
];
}
}