当前位置:网站首页>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');
边栏推荐
- sysbench基础介绍
- Character sets and comparison rules
- [online simulation] Arduino uno PWM controls the speed of DC motor
- [difficult and miscellaneous diseases] @transitional failure summary
- [deep learning theory] (6) recurrent neural network RNN
- Notes - simple but adequate series_ KVM quick start
- (Typora图床)阿里云oss搭建图床+Picgo上传图片详细教程
- 【深度学习理论】(6) 循环神经网络 RNN
- 互联网对抗神器之漏洞扫描与反渗透
- laravel中使用group by分组并查询数量
猜你喜欢

Easyx-----c语言实现2048

代码规范 & 详细解释 husky、prettier、eslint、lint-staged 的作用和使用

Flutter and native communication (Part 1)

Code specification & explain in detail the functions and uses of husky, prettier, eslint and lint staged

DataBinding使用与原理分析

Basic MySQL

Implementing MySQL master-slave replication in docker

Swiftui development experience: data layer of application design for offline priority

Docker中实现MySQL主从复制

c语言 --- 运算符和表达式
随机推荐
Common regular expressions - tool classes (mobile number, email, QQ, fax)
Laravel-admin 登录添加图形验证码
Introduction to sysbench Basics
UDP flood attack defense principle
MySQL performance monitoring and SQL statements
PC qq Hall upload Update Modifying versioninfo
consul微服务治理中心踩坑
Implementing MySQL master-slave replication in docker
JWT (SSO scheme) + three ways of identity authentication
Oracle sqlplus query result display optimization
Query online users and forced withdrawal users based on oauth2
在Oracle中update大量数据会不会导致undo空间爆掉
Search engine advanced search method records
Origin of b+ tree index
[software project management] sorting out knowledge points for final review
Which PHP open source works deserve attention
wangEditor 上传本地视频修改
滑动窗口
最牛X的CMDB系统
【深度学习理论】(7) 长短时记忆网络 LSTM