| xqd
@@ -26,16 +26,13 @@ class InsuranceAgreementController extends AdminController
|
|
|
{
|
|
|
$grid = new Grid(new InsuranceAgreement());
|
|
|
$grid->disableBatchActions();
|
|
|
- $grid->actions(function ($actions){
|
|
|
- $actions->disableView();
|
|
|
- });
|
|
|
$grid->filter(function ($filter){
|
|
|
$filter->disableIdFilter();
|
|
|
$filter->like('name','协议名称');
|
|
|
});
|
|
|
$grid->column('id', __('Id'));
|
|
|
$grid->column('name', __('协议名称'));
|
|
|
- $grid->column('content', __('协议内容'))->limit(20,'...');
|
|
|
+// $grid->column('content', __('协议内容'))->limit('300','...');
|
|
|
$status = [
|
|
|
'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],
|
|
|
'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],
|
| xqd
@@ -54,6 +51,19 @@ class InsuranceAgreementController extends AdminController
|
|
|
* @return Show
|
|
|
*/
|
|
|
|
|
|
+ protected function detail($id)
|
|
|
+ {
|
|
|
+ $show = new Show(InsuranceAgreement::findOrFail($id));
|
|
|
+
|
|
|
+ $show->field('id', 'ID');
|
|
|
+ $show->field('name', '协议名称');
|
|
|
+ $show->field('content', '协议内容')->unescape();
|
|
|
+ $show->field('status', '状态')->using([0=>'禁用',1=>'启用'])->label('info');
|
|
|
+ $show->field('created_at', '创建时间');
|
|
|
+ $show->field('updated_at', '更新时间');
|
|
|
+
|
|
|
+ return $show;
|
|
|
+ }
|
|
|
/**
|
|
|
* Make a form builder.
|
|
|
*
|