You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
984 B
56 lines
984 B
2 years ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Requests;
|
||
|
|
||
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
||
|
class MenuRequest extends FormRequest
|
||
|
{
|
||
|
/**
|
||
|
* Determine if the user is authorized to make this request.
|
||
|
*
|
||
|
* @return bool
|
||
|
*/
|
||
|
public function authorize()
|
||
|
{
|
||
|
// only allow updates if the user is logged in
|
||
|
return backpack_auth()->check();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the validation rules that apply to the request.
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function rules()
|
||
|
{
|
||
|
return [
|
||
|
// 'name' => 'required|min:5|max:255'
|
||
|
];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the validation attributes that apply to the request.
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function attributes()
|
||
|
{
|
||
|
return [
|
||
|
//
|
||
|
];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the validation messages that apply to the request.
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function messages()
|
||
|
{
|
||
|
return [
|
||
|
//
|
||
|
];
|
||
|
}
|
||
|
}
|