Browse Source

禁止编辑

master
李可松 4 years ago
parent
commit
1e3cb50347
  1. 2
      app/Admin/Controllers/IndustryProductController.php

2
app/Admin/Controllers/IndustryProductController.php

@ -24,6 +24,7 @@ class IndustryProductController extends AdminController
return Grid::make(new IndustryProduct(['category']), function (Grid $grid) {
$grid->disableCreateButton();
$grid->disableDeleteButton();
$grid->disableEditButton();
//如果是审核页面,多加where条件判断
if (strpos(Route::current()->uri, 'audit')) {
@ -76,6 +77,7 @@ class IndustryProductController extends AdminController
{
return Show::make($id, new IndustryProduct(['category:id,name', 'supplier:id,name,contact_phone']), function (Show $show) {
$show->disableDeleteButton();
$show->disableEditButton();
$show->field('id');
$show->field('supplier.name', '供应商');

Loading…
Cancel
Save