diff --git a/app/Admin/Controllers/AdminNoticeController.php b/app/Admin/Controllers/AdminNoticeController.php index b7646a1..1d7a0b7 100644 --- a/app/Admin/Controllers/AdminNoticeController.php +++ b/app/Admin/Controllers/AdminNoticeController.php @@ -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('更新时间') ]); diff --git a/app/Models/AdminNotice.php b/app/Models/AdminNotice.php index 00ea281..496c4c1 100644 --- a/app/Models/AdminNotice.php +++ b/app/Models/AdminNotice.php @@ -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'); + } } diff --git a/app/Models/Keyword.php b/app/Models/Keyword.php index 8c53e54..644c10f 100644 --- a/app/Models/Keyword.php +++ b/app/Models/Keyword.php @@ -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() {