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.
30 lines
706 B
30 lines
706 B
<?php |
|
|
|
/** |
|
* |
|
* Route.php |
|
* User: ChenLong |
|
* DateTime: 2020-04-25 16:11 |
|
*/ |
|
|
|
namespace app\common\validate; |
|
|
|
use think\Validate; |
|
|
|
class Route extends Validate |
|
{ |
|
protected $rule = [ |
|
'title|权限标题' => 'require', |
|
'route|权限路由' => 'require', |
|
'pid|父级菜单' => 'require|number', |
|
'type|类型' => 'require|number|in:1,2', |
|
'weigh|排序权重' => 'require|number', |
|
'icon|图标' => 'require', |
|
'id|权限路由信息' => 'require|number', |
|
]; |
|
|
|
protected $scene = [ |
|
'add' => ['title', 'route', 'pid', 'type', 'weigh', 'icon',], |
|
'edit' => ['title', 'route', 'pid', 'type', 'weigh', 'icon', 'id',], |
|
]; |
|
}
|
|
|