60 lines
1.8 KiB
PHP
60 lines
1.8 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\Bo\Convictionpages;
|
||
|
|
|
||
|
|
use App\Traits\Requests\HasPicture;
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class UpdateConvictionpageRequest extends FormRequest
|
||
|
|
{
|
||
|
|
use HasPicture;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 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()
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'key_feed' => 'required|numeric|max:2147483647',
|
||
|
|
'key_earth_1' => 'required|numeric|max:2147483647',
|
||
|
|
'key_earth_2' => 'required|numeric|max:2147483647',
|
||
|
|
'key_together_1' => 'required|numeric|max:2147483647',
|
||
|
|
'key_together_2' => 'required|numeric|max:2147483647',
|
||
|
|
'key_together_3' => 'required|numeric|max:2147483647',
|
||
|
|
'key_together_4' => 'required|numeric|max:2147483647',
|
||
|
|
'key_territory' => 'required|numeric|max:2147483647',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get custom attributes for validator errors.
|
||
|
|
*
|
||
|
|
* @return array
|
||
|
|
*/
|
||
|
|
public function attributes(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'key_feed' => trans('validation.custom.key_feed'),
|
||
|
|
'key_earth_1' => trans('validation.custom.key_earth_1'),
|
||
|
|
'key_earth_2' => trans('validation.custom.key_earth_2'),
|
||
|
|
'key_together_1' => trans('validation.custom.key_together_1'),
|
||
|
|
'key_together_2' => trans('validation.custom.key_together_2'),
|
||
|
|
'key_together_3' => trans('validation.custom.key_together_3'),
|
||
|
|
'key_together_4' => trans('validation.custom.key_together_4'),
|
||
|
|
'key_territory' => trans('validation.custom.key_territory'),
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|