在Laravel-Admin 中,`Form::when()` 方法用于根据条件动态显示或隐藏表单字段。它接受两个参数:一个布尔表达式和一个回调函数。当布尔表达式为真时,回调函数中的代码将执行;否则,表单字段将被隐藏。 以下是`Form::when()` 方法的一般用法示例: ```php Form::when($condition, function (Form $form) { //...
protected function form() { $form = new Form(new Mooc()); $form->text('title', '标题'); $form->image('cover', __('Cover')); $form->radio('type', __('Type'))->default(2) ->options(Mooc::$fields_alias['type']) ->when(1, function (Form $form) { $form->file('video...
$form->radio('ar',"覆盖区域")->options(array(1=>'全国',0=>'非全国'))->when(1, function (Form $form) { $form->multipleSelect('provincebs',__('禁用省'))->options(Province::where('status',1)->pluck('province','provinceid')); $form->multipleSelect('citiebs',__('禁用市'))...
FB does not parse from the my application. Can we effect browser window title when FB displays our application? Are you working on an iFrame application? As far as I know the only way to... How to set the correct timezone to get a isoformat datetime string in Python? I need ...
Obtaining phone type in string, when type is custom I obtained contact list from phone with names, phone numbers and phone types. Phone types may be 1 (home), 2 (mobile), etc... And when phone type is custom (for example, "CustomType"), value... ...
//这个是Logo全称/*|---|Laravel-adminminilogo|---||Thelogoofalladminpageswhenthesidebarmenuiscollapsed.Youcan|alsosetitasanimagebyusinga`img`tag,eg|''.|*/'logo-mini'=>'PF',//这个是导航缩小以后的logo 改菜单: 菜单
laravel 5.4 改变了默认的数据库字符集,现在utf8mb4包括存储emojis支持。如果你运行MySQLv5.7.7或者更高版本,则不需要做任何事情。 当你试着在一些MariaDB或者一些老版本的的MySQL上运行 migrations 命令时,你可能会碰到下面这个错误: 代码语言:javascript
get from trans : trans('admin.configx.tabs.image'); tab名称留空则从翻译中获取],// Whether check group permissions.//if (!Admin::user()->can('confix.tab.base')) {/*hide base tab*/ } .'check_permission'=>false,'break_when_errors'=>false// do not save anything if have errors]...
Laravel Version: 6.2 PHP Version:7.2 Laravel-admin: 1.7 Description: when i run php artisan admin:install it appends error :"Class name must be a valid object or a string"
link 将字段显示为一个链接。 // link方法不传参数时,链接的`href`和`text`都是当前列的值 $grid->column('homepage')->link(); // 或者传入一个指定的href $grid->column('homepage')->link($href); 1. 2. 3. 4. 5. link 方法支持传入匿名方法,所以支持定义关联的链接,实现类似 Laravel Nova 的...