| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- /**
- * Created by PhpStorm.
- * User: qiuzijian
- * Date: 2021-04-15
- * Time: 16:01
- */
- namespace Modules\Admin\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- class MenusRequest extends FormRequest
- {
- /**
- * Get the validation rules that apply to the request.
- *
- * @return array
- */
- public function rules()
- {
- return [
- 'parent_id' => 'numeric', // 父级id
- 'icon' => 'alpha_dash', // 图标
- 'title' => 'required', // 栏目名称
- // 'slug' => 'required|alpha_dash', // 标识
- 'path' => 'required|string', // 路由
- 'sort' => 'numeric', // 排序
- 'show' => 'boolean', // 是否显示
- ];
- }
- /**
- * Determine if the user is authorized to make this request.
- *
- * @return bool
- */
- public function authorize()
- {
- return true;
- }
- }
|