文章列表显示地址

This commit is contained in:
2021-10-14 14:51:34 +08:00
parent 14011f9674
commit 160a71752f
4 changed files with 12 additions and 20 deletions

View File

@@ -35,6 +35,11 @@ class IndexController extends AdminController
$grid->column('cover', '封面图片')->image('', 100);
$grid->column('category.title', '所属分类');
$grid->column('title', '文章标题');
$grid->column('文章前台地址')
->display(function () {
return $this->link;
})
->hide();
$states = [
'on' => ['value' => 1, 'text' => '打开', 'color' => 'primary'],
'off' => ['value' => 2, 'text' => '关闭', 'color' => 'default'],