当前位置:网站首页>Laravel admin hidden button, and set button display, default sequence, form form form non modifiable value
Laravel admin hidden button, and set button display, default sequence, form form form non modifiable value
2022-06-26 11:06:00 【siner. li】
Global concealment
stay bootstrap.php in
use Encore\Admin\Form;
Form::init(function (Form $form) {
$form->tools(function (Form\Tools $tools) {
// Get rid of ` list ` Button
$tools->disableList();
// Get rid of ` Delete ` Button
$tools->disableDelete();
// Get rid of ` see ` Button
$tools->disableView();
});
$form->footer(function ($footer) {
// Get rid of ` see `checkbox
$footer->disableViewCheck();
// Get rid of ` continue editing `checkbox
$footer->disableEditingCheck();
// Get rid of ` Continue to create `checkbox
$footer->disableCreatingCheck();
});
});
\Encore\Admin\Show::init(function (Show $show) {
$show->panel()
->tools(function ($tools) {
$tools->disableEdit();
$tools->disableDelete();
});
});
// Remove the import
\Encore\Admin\Grid::init(function (\Encore\Admin\Grid $grid) {
$grid->disableExport();
});
Single module removal button
// Remove row selection
$grid->disableRowSelector();
// Remove the Add button
$grid->disableActions();
// Remove the operation button
$grid->disableActions();
// Disable the export data button
$grid->disableExport();
$grid->tools(function ($tools) {
$tools->batch(function ($batch) {
// Remove batch deletion
$batch->disableDelete();
});
});
Get rid of laravel Model time
public $timestamps = false;
Add button to header
//
$grid->tools(function (Grid\Tools $tools) {
$tools->append($this->html());
});
// After the current file
public function html()
{
return <<<HTML <a href="/admin/goods" class="btn btn-sm btn-success"> return </a> HTML;
}
show Model Remove the button
$show->panel()
->tools(function ($tools) {
$tools->disableEdit();
$tools->disableList();
$tools->disableDelete();
});
Sequence of rows
$grid->number(' Serial number ');
$grid->rows(function ($row, $number) {
$row->column('number', $number+1);
});
form The value cannot be modified
$form->display('column1');
边栏推荐
- 【深度学习理论】(6) 循环神经网络 RNN
- 目前为止最全的Kubernetes最新版核心命令
- JS take the date of the previous month 【 pit filling 】
- Update mysql5.6 to 5.7 under Windows
- C language -- operators and expressions
- nacos2.x.x启动报错信息Error creating bean with name ‘grpcClusterServer‘;
- Laravel-admin 登录添加图形验证码
- Cereals Mall - Distributed Advanced
- Tape library simple record 1
- Redis (basic) - learning notes
猜你喜欢

4、 Stacks and queues

QT connection MySQL data query failed

Opencv image processing - grayscale processing

携程机票 App KMM 跨端 KV 存储库 MMKV-Kotlin | 开源

栖霞市住建局和消防救援大队开展消防安全培训

Easyexcel - Excel read / write tool

Vscode environment setup: synchronous configuration

nacos2.x.x启动报错信息Error creating bean with name ‘grpcClusterServer‘;

Redis (basic) - learning notes

Linux下安装Mysql【详细】
随机推荐
Grain Mall - High Availability Cluster
jwt认证协议阐述之——我开了一家怡红院
一键部署ceph脚本
Linux下安裝Mysql【詳細】
AIX basic operation record
nacos2.x.x启动报错信息Error creating bean with name ‘grpcClusterServer‘;
laravel-admin 非自增ID获取, 及提交隐藏表单
MySQL 30 military regulations
Hazelnut cloud - SMS (tool)
OpenCV图像处理-灰度处理
laravel 安装报错 Uncaught ReflectionException: Class view does not exist
Nuxt. JS - learning notes
Svn installation configuration
Detailed explanation of MySQL fuzzy query
C language -- operators and expressions
Easyx----- C language implementation 2048
4、 Stacks and queues
Notes - simple but adequate series_ KVM quick start
Flutter and native communication (Part 1)
Origin of b+ tree index