会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
靈影
博客园
首页
新随笔
联系
订阅
管理
2021年2月6日
laravel-admin 禁用 详情页按钮
摘要: $grid->actions(function (Grid\Displayers\Actions $actions) { $actions->disableView(); }); 文档中好像没翻到,翻源码翻到的,新旧版按钮都有效,我的是改回了旧版 config/admin.php 中 'grid_a
阅读全文
posted @ 2021-02-06 15:23 靈影
阅读(810)
评论(0)
推荐(0)
2021年2月2日
Laravel-admin 模型表格 删除行,删除回调
摘要: 在模型中增加 protected static function booted(){ static::deleting(function ($_it) { $total = 1; //在这里去做逻辑判断,$_it->id 可以拿到当前操作id if ($total > 0) { throw new
阅读全文
posted @ 2021-02-02 15:52 靈影
阅读(1065)
评论(0)
推荐(0)
laravel-admin 字段非空并设有默认值,表单提交时仍然提示Integrity constraint violation
摘要: app/Http/Kernel.php中 protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, \Fruitcake\Cors\Ha
阅读全文
posted @ 2021-02-02 09:58 靈影
阅读(586)
评论(0)
推荐(0)
2021年2月1日
laravel-admin 报错 Disk [admin] not configured, please add a disk config in `config/filesystems.php`.
摘要: 在config/filesystems.php中添加: 'disks' => [ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), ], 'public' => [ 'driver' => 'local', 'root'
阅读全文
posted @ 2021-02-01 15:10 靈影
阅读(312)
评论(0)
推荐(0)
公告