添加格式化时间
parent
b8fbc8394a
commit
dddff27e78
|
|
@ -14,7 +14,7 @@ class AdminNoticeController extends AdminController
|
|||
{
|
||||
protected string $serviceName = AdminNoticeService::class;
|
||||
|
||||
protected string $pageTitle = '公告管理';
|
||||
protected string $pageTitle = '公告管理';//待完善-todo
|
||||
|
||||
public function list(): Page
|
||||
{
|
||||
|
|
@ -55,6 +55,8 @@ class AdminNoticeController extends AdminController
|
|||
return $this->baseDetail()->body([
|
||||
TextControl::make()->static(true)->name('id')->label('ID'),
|
||||
TextControl::make()->static(true)->name('title')->label('标题'),
|
||||
//-todo
|
||||
|
||||
TextControl::make()->static(true)->name('created_at')->label('创建时间'),
|
||||
TextControl::make()->static(true)->name('updated_at')->label('更新时间')
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -13,4 +13,7 @@ class AdminNotice extends Model
|
|||
|
||||
protected $fillable = ['title', 'content', 'article_id', 'remark', 'is_enable', 'published_at' ,'sort'];
|
||||
|
||||
protected function serializeDate(\DateTimeInterface $date){
|
||||
return $date->format('Y-m-d H:i:s');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ class Keyword extends Model
|
|||
use Filterable;
|
||||
|
||||
protected $fillable = ['name', 'key', 'value', 'parent_id', 'type_key', 'path', 'sort', 'level'];
|
||||
|
||||
protected function serializeDate(\DateTimeInterface $date){
|
||||
return $date->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
protected static function boot()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue