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.
32 lines
690 B
32 lines
690 B
<?php |
|
/** |
|
* |
|
* Banner.php |
|
* User: ChenLong |
|
* DateTime: 2021-01-11 17:40:20 |
|
*/ |
|
|
|
namespace app\common\validate; |
|
|
|
use app\common\BaseValidate; |
|
|
|
/** |
|
* Class Banner |
|
* @package app\common\validate\Banner |
|
* @author chenlong <vip_chenlong@163.com> |
|
*/ |
|
class Banner extends BaseValidate |
|
{ |
|
protected $rule = [ |
|
'id|轮播图' => 'require|number', |
|
'title|标题' => 'require', |
|
'cover|封面图' => 'require', |
|
'cover_url|封面图路径' => 'require', |
|
'sort|排序' => 'require|number', |
|
]; |
|
|
|
protected $scene = [ |
|
'add' => ['title', 'cover', 'cover_url', 'sort'], |
|
'edit' => ['id', 'title', 'cover', 'cover_url', 'sort'], |
|
]; |
|
}
|
|
|