<?php

use App\Admin\Extensions\WangEditor;
use Encore\Admin\Form;
use Encore\Admin\Grid;

//Form::forget(['map', 'editor']);
//Form::extend('editor', WangEditor::class);

Form::init(function (Form $form) {
    $form->disableEditingCheck();
    $form->disableCreatingCheck();
    $form->disableViewCheck();

    $form->tools(function (Form\Tools $tools) {
        $tools->disableDelete();
        $tools->disableView();
        // $tools->disableList();
    });
});

Grid::init(function (Grid $grid) {
    $grid->disableExport();
    $grid->actions(function (Grid\Displayers\Actions $actions) {
        $actions->disableView();
    });
    $grid->disableBatchActions();
    $grid->filter(function ($filter) {
        $filter->disableIdFilter();
    });
    //    $grid->expandFilter();
});
