Hi
Is there anyway to access all model attributes in button view . yet we just access to columns that show in data table view .
From https://laravel-backpack.readme.io/docs/crud-buttons
The most useful variables you'll have in this file here are:
- $entry - the database entry you're showing (only inside the line stack);
- $crud
You can use $crud->getEntries();
I have almost the same issue. I want to access some model attributes in a custom column view.
But i only have access to attributes declared with addColumn in the controller.
I not, they are they are not in $crud->getEntries();
I found that if ajax table view is enabled , $entry just return database column we are showing in data table view not all model attributes .
the problem is in this line :
https://github.com/Laravel-Backpack/CRUD/blob/master/src/app/Http/Controllers/CrudFeatures/AjaxTable.php#L16
Yes enableAjaxTable changes a lot of things...
Also model_function and accessors are not working with enableAjaxTable.
Most helpful comment
From https://laravel-backpack.readme.io/docs/crud-buttons
You can use $crud->getEntries();