Sites.php
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
+-----------------------------------------------------------------------------------------------------------------------
* 管理端表单 trait层:渲染生成 Bus form 表单
+-----------------------------------------------------------------------------------------------------------------------
*
* PHP version 7
*
* @category App\Admin\Forms
* @package App\Admin\Forms
* @author Richer <yangzi1028@163.com>
* @date 2023年2月28日14:35:45
* @copyright 2022-2022 Richer (http://www.Richer.com/)
* @license http://www.Richer.com/ License
* @link http://www.Richer.com/
*/
namespace App\Admin\Selectable;
use App\Models\Route;
use App\Models\Site;
use Encore\Admin\Grid\Filter;
use Encore\Admin\Grid\Selectable;
/**
* Trait BusForm
*
* @package App\Admin\Forms\Bus
*/
class Sites extends Selectable
{
public $model = Site::class;
public function make()
{
$this->column('id');
$this->column('name');
$this->column('sort')->editable();
$this->column('created_at');
$this->filter(function (Filter $filter) {
$filter->like('name');
});
}
}