The v2 is a major rewrite of a big part of the package.
Follow the steps below to upgrade the package.
Some config changes have been made. If you customized it, you should re-publish it and reapply your changes.
The translations files have been removed and will not be used anymore.
Translations have now to be handled this way.
Some template changes have been made. If you customized them, you should re-publish them and reapply your changes.
The table configurations are now gathered in the app/Tables directory.
To follow the package upgrade, you should execute the following steps for each table you declared:
php artisan make:table UsersTable --model=App/User.$table = (new UsersTable())->setup(); and pass it to the view.{{ $table }}.There are small changes in the API you will have to report in your code:
Table use of ->resultsComponentPath( by ->resultsTemplatePath(.Table use of ->icon( by ->prependHtml(.Table use of ->appends( by ->appendData(.Table use of ->rowsNumberSelectionActivation( by ->activateRowsNumberDefinition(.Column use of ->prepend( by ->prependHtml(.Column use of ->append( by ->appendsHtml(.If for any reason you need to work with the table rows, you now will have to do it this way:
$table = (new UsersTable())->setup();
$rows = $table->getPaginator()->getCollection();
Instead of this way in previous versions:
$table = (new Table());
// ... Any table configuration
$table->render();
$table->list->getCollection();
As so, you should search for all $table->list use in your code and make the necessary replacements.
See all change with the comparison tool.
If you see any forgotten and undocumented change, please submit a PR to add them to this upgrade guide.
How can I help you explore Laravel packages today?