z-song / demo.laravel-admin.org

Source code of official http://demo.laravel-admin.org website.
507 stars 250 forks source link

method "expand" in column object is in the demo , but can't find it in the files #23

Closed amjadmasri closed 6 years ago

amjadmasri commented 6 years ago

in the demo inside the user grid , there is a column with the feature to expand and view a table with the profile information inside it , I tried to use the same code and it is giving me a null cell in the column image , and I can't find any method inside the column.php file called "expand" . was this functionality removed ? if it was what can I do to mimic the same behavior without using the expand method.

z-song commented 6 years ago

Its' a column extension, not a builtin feature, to use this, at first add this extension ExpandRow.php, then register this in bootstrap.php

use Encore\Admin\Grid\Column;
use App\Admin\Extensions\Column\ExpandRow;

Column::extend('expand', ExpandRow::class);

Now you can use this feature now

bmwael commented 6 years ago

use App\Admin\Extensions\ExpandRow; instead of use App\Admin\Extensions\Column\ExpandRow;