Laravel-admin 中列表中禁止某行編輯、刪除

laravelsssss發表於2019-01-18

$grid->actions(function (Grid\Displayers\Actions $actions) {
if ($actions->getKey() == 1) {
$actions->disableDelete();
}
});

禁止 列表的刪除操作

$grid->tools(function (Grid\Tools $tools) {
$tools->batch(function (Grid\Tools\BatchActions $actions) {
$actions->disableDelete();
});
});

相關文章