Search code examples
phplaraveldatatablesinfyom

Boilerplates for infyOm cannot setup the DataTables [Laravel 6.0 using AdminLTE Boilerplate]


I am using Laravel 6.0 for this project. I cannot set up the DataTables properly when using InfyOm's Boilerplate. I've followed the documentation part which is here regarding the boilerplate and run composer install on the terminal.

After finishing, I then created a sample scaffold CRUD in order to see if the DataTables worked. And it didn't work. It only displays this after creating a sample data for the CRUD.

I then check infyOm's documentation regarding the Datatable. But before that, I run a php artisan infyom:rollback Test scaffold to rollback the previously created scaffold.

I then followed this documentation regarding the setup for DataTable. I've installed the 3 mentioned packages—DataTables, DataTable Button Pluging, and the HTML plugin.

After installing the 3 packages, I then change the 'add_on.datatables' => false into true in the config/infyom/laravel_generator.php file and inserted the necessary providers and aliases within the config/app.php file. I then run a php artisan config:clear command and run another php artisan infyom:scaffold command.

But still, the Datatables still doesn't work.

Did I make a mistake on installing the DataTables?


Solution

  • I just found out that I need to run a php artisan vendor:publish --tag=datatables-buttons after all of the mentioned steps. Datatables now works fine.