Grid initialization settings

Since v1.6.10 #3054

In the version v1.6.10, the initial setting function of the table is added to set the table globally.

For example, if you need to disable some operations in all tables, you can add the following code in app/Admin/bootstrap.php:

use Encore\Admin\Grid;

Grid::init(function (Grid $grid) {









    $grid->actions(function (Grid\Displayers\Actions $actions) {

This way you don't have to set it in the code of each controller.

If you want to enable settings in one of the tables, such as opening the display action column, call $grid->disableActions(false); on the corresponding instance.