|
|
@ -25,6 +25,7 @@ class NoticeController extends AdminController |
|
|
$grid->column('id')->sortable(); |
|
|
$grid->column('id')->sortable(); |
|
|
$grid->column('author'); |
|
|
$grid->column('author'); |
|
|
$grid->column('title'); |
|
|
$grid->column('title'); |
|
|
|
|
|
$grid->column('status','是否启用')->switch(); |
|
|
$grid->column('sort')->editable()->width(120); |
|
|
$grid->column('sort')->editable()->width(120); |
|
|
$grid->column('created_at'); |
|
|
$grid->column('created_at'); |
|
|
$grid->column('updated_at'); |
|
|
$grid->column('updated_at'); |
|
|
@ -57,6 +58,7 @@ class NoticeController extends AdminController |
|
|
$show->field('author'); |
|
|
$show->field('author'); |
|
|
$show->field('title'); |
|
|
$show->field('title'); |
|
|
$show->field('content')->unescape(); |
|
|
$show->field('content')->unescape(); |
|
|
|
|
|
$show->field('status','是否启用'); |
|
|
$show->field('sort'); |
|
|
$show->field('sort'); |
|
|
$show->field('created_at'); |
|
|
$show->field('created_at'); |
|
|
$show->field('updated_at'); |
|
|
$show->field('updated_at'); |
|
|
@ -80,6 +82,7 @@ class NoticeController extends AdminController |
|
|
$form->text('author')->default(Admin::user()->name); |
|
|
$form->text('author')->default(Admin::user()->name); |
|
|
$form->text('title')->required(); |
|
|
$form->text('title')->required(); |
|
|
$form->editor('content'); |
|
|
$form->editor('content'); |
|
|
|
|
|
$form->switch('status','是否启用'); |
|
|
$form->text('sort')->default(255); |
|
|
$form->text('sort')->default(255); |
|
|
})->saving(function (Form $form) { |
|
|
})->saving(function (Form $form) { |
|
|
//不允许修改非自己的数据
|
|
|
//不允许修改非自己的数据
|
|
|
|