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.
62 lines
1.4 KiB
62 lines
1.4 KiB
<?php |
|
|
|
namespace App\Admin\Controllers; |
|
|
|
use App\Models\UserFollowStatus; |
|
use Dcat\Admin\Form; |
|
use Dcat\Admin\Grid; |
|
use Dcat\Admin\Show; |
|
use Dcat\Admin\Http\Controllers\AdminController; |
|
|
|
class UserFollowStatusController extends AdminController |
|
{ |
|
public $title = "回访状态管理"; |
|
|
|
|
|
protected function grid() |
|
{ |
|
return Grid::make(new UserFollowStatus(), function (Grid $grid) { |
|
$grid->model()->orderByDesc('id'); |
|
|
|
$grid->column('id')->sortable(); |
|
$grid->column('name', '名称'); |
|
$grid->column('created_at'); |
|
$grid->column('updated_at')->sortable(); |
|
|
|
$grid->disableViewButton(); |
|
}); |
|
} |
|
|
|
/** |
|
* Make a show builder. |
|
* |
|
* @param mixed $id |
|
* |
|
* @return Show |
|
*/ |
|
protected function detail($id) |
|
{ |
|
return Show::make($id, new UserFollowStatus(), function (Show $show) { |
|
$show->field('id'); |
|
$show->field('name'); |
|
$show->field('created_at'); |
|
$show->field('updated_at'); |
|
}); |
|
} |
|
|
|
/** |
|
* Make a form builder. |
|
* |
|
* @return Form |
|
*/ |
|
protected function form() |
|
{ |
|
return Form::make(new UserFollowStatus(), function (Form $form) { |
|
$form->display('id'); |
|
$form->text('name'); |
|
|
|
$form->display('created_at'); |
|
$form->display('updated_at'); |
|
}); |
|
} |
|
}
|
|
|