You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
52 lines
1.3 KiB
<?php
|
|
|
|
use Dcat\Admin\Admin;
|
|
use Dcat\Admin\Grid;
|
|
use Dcat\Admin\Form;
|
|
use Dcat\Admin\Grid\Filter;
|
|
use Dcat\Admin\Show;
|
|
|
|
/**
|
|
* Dcat-admin - admin builder based on Laravel.
|
|
* @author jqh <https://github.com/jqhph>
|
|
*
|
|
* Bootstraper for Admin.
|
|
*
|
|
* Here you can remove builtin form field:
|
|
*
|
|
* extend custom field:
|
|
* Dcat\Admin\Form::extend('php', PHPEditor::class);
|
|
* Dcat\Admin\Grid\Column::extend('php', PHPEditor::class);
|
|
* Dcat\Admin\Grid\Filter::extend('php', PHPEditor::class);
|
|
*
|
|
* Or require js and css assets:
|
|
* Admin::css('/packages/prettydocs/css/styles.css');
|
|
* Admin::js('/packages/prettydocs/js/main.js');
|
|
*
|
|
*/
|
|
|
|
// 覆写dcat部分模板
|
|
app('view')->prependNamespace('admin', resource_path('views/dcat'));
|
|
|
|
// 列表页的表格显示边框
|
|
Grid::resolving(function (Grid $grid) {
|
|
$grid->withBorder();
|
|
});
|
|
|
|
// 金额输入组件提交的时候自动去掉逗号
|
|
Form\Field\Currency::resolving(function (Form\Field\Currency $currency) {
|
|
$currency->options(['autoUnmask' => true]);
|
|
});
|
|
|
|
// 上传图片自动重命名
|
|
Form\Field\Image::resolving(function (Form\Field\Image $image) {
|
|
$image->uniqueName();
|
|
});
|
|
|
|
// 筛选器默认以面板方式显示
|
|
Filter::resolving(function (Filter $filter) {
|
|
$filter->panel();
|
|
});
|
|
|
|
// 隐藏底部版权信息
|
|
Admin::style('.main-footer .d-block{display: none !important}');
|