laravel-table

Generate tables from Eloquent models.

MIT License

Downloads
48.8K
Stars
534
Committers
8

Bot releases are hidden (Show)

laravel-table -

Published by Okipa about 4 years ago

laravel-table -

Published by Okipa about 4 years ago

laravel-table -

Published by Okipa about 4 years ago

  • Reverted the previous change (3.0.1) as the button method without arguments has no visual effect: added instructions in V2 to v3 the upgrade-guide to take care of this new behaviour.
  • Fixed an issue where create action button was not displayed when searching and rows number definition were disabled.
  • Fixed a v3 regression where rows number definition was wrongly named rows number selection at different places (config, templates, methods, ...): this is an unfortunately breaking change if you published config or templates but I take advantage of the early release of the V3 and from the fact that Laravel 8 is not released to do it.
  • Show and edit actions are now triggered by a simple link rather than a form, which was useless as these routes are called with a GET http request.
  • Minor default templates changes in order to give laravel-table a prettier look.
  • Minor default config value changes in order to give laravel-table a prettier look.
laravel-table -

Published by Okipa about 4 years ago

  • Fixed Column button method behaviour which is supposed to allow usage without arguments.
laravel-table -

Published by Okipa about 4 years ago

  • Added Laravel 8 support
  • Dropped Laravel 6 support
  • Added template customization methods for Table instances :
    • rowsSearchingTemplate
    • rowsNumberSelectionTemplate
    • createActionTemplate
    • columnTitlesTemplate
    • navigationStatusTemplate
    • paginationTemplate
  • Updated templates

👉 See the upgrade guide

laravel-table -

Published by Okipa over 4 years ago

  • Dropped support for PHP versions under 7.4.
  • Dropped support for Laravel versions under 6.0.
  • Restructured configuration file.
  • Removed translation files.
  • Updated templates.
  • Removed the deprecated methods.
  • Refactored the whole architecture to facilitate code comprehension and maintenance.
  • New architecture and usage.

👉 See the upgrade guide

laravel-table -

Published by Okipa over 4 years ago

  • Deprecated the ->icon() method.
  • Added the ->prepend() method to the table columns (which will replace the previous ->icon() one) to prepend HTML to a column value.
  • Added the ->append() method to the table columns to append HTML to a column value.
laravel-table -

Published by Okipa over 4 years ago

  • Added more granularity in the template customization possibilities : the show, edit and destroy actions are now defined in their own component. This way, it becomes easier to customize tiny parts of the table without touching to the others.
    • Added config('laravel-table.template.show'), config('laravel-table.template.edit') and config('laravel-table.template.destroy') configs to set each new default component path.
    • Added ->showTemplate(), ->editTemplate() and ->destroyTemplate() to give the ability to customize these templates on the fly.
  • Added fallback path for each template if the config value is not defined, in order to prevent any update breaking change.
laravel-table -

Published by Okipa over 4 years ago

  • Tests have been migrated from Travis to Github actions.
  • Added PHP7.4 support.
  • Added Laravel 7 support.
  • Dropped Laravel support before 5.8 version.
  • Dropped PHP support before 7.2 version.
  • Reworked documentation.
laravel-table -

Published by Okipa over 4 years ago

  • Fixed missing column when the show action is the only one defined.
laravel-table -

Published by Okipa almost 5 years ago

  • Replaced hard-coded info action icon by config value.
laravel-table -

Published by Okipa about 5 years ago

  • Fixed the translations publication and overriding as specified on the Laravel documentation : https://laravel.com/docs/packages#translations.
  • Changed the command to publish the translations to : php artisan vendor:publish --tag=laravel-table:translations
  • Changed the command to publish the configuration to : php artisan vendor:publish --tag=laravel-table:config
  • Changed the command to publish the views to : php artisan vendor:publish --tag=laravel-table:views
  • Improved testing with Travis CI (added some tests with --prefer-lowest composer tag to check the package compatibility with the lowest dependencies versions).
laravel-table -

Published by Okipa about 5 years ago

  • Transferred PhpUnit builds tasks from Scrutinizer to Travis CI.
  • Transferred code coverage storage from Scrutinizer to Coveralls.
  • Re-authorized PHP7.1 as minimal version.
laravel-table -

Published by Okipa about 5 years ago

  • The model is now directly passed to the route during the table show, edit and destroy routes generation instead of its id.
// assuming your declared your edit route like this :
(new Table)->model(User::class)->routes([
    // ...
    'edit'    => ['name'=> 'user.edit', 'params' => ['foo' => 'bar']],
    //...
])
// the route will be generated like this during the table instantiation :
route('user.edit, [$user, 'foo' => 'bar']);
// instead of this way
route('user.edit, [$user->id, 'foo' => 'bar']);
laravel-table -

Published by Okipa about 5 years ago

  • Fixed params order when generating the table routes. The table model id was not positioned at first when declaring other parameters.
// with a route declared like this :
Route::get('user/edit/{user}/{foo}', 'UsersController@edit')->name('user.edit');
// and a table routes declaration like this :
(new Table)->model(User::class)->routes([
    // ...
    'edit'    => ['name'=> 'user.edit', 'params' => ['bar']],
    //...
])
// the route is now correctly generated and gives : /user/edit/1/bar instead of /user/edit/bar/1
laravel-table -

Published by Okipa about 5 years ago

  • Fixed the show, edit and destroy route generation, since Laravel 6 does handle differently the key given in the route() helper call :
// assuming your declared your edit route like this :
(new Table)->model(User::class)->routes([
    // ...
    'edit'    => ['name'=> 'user.edit', 'params' => ['foo' => 'bar']],
    //...
])
// the route will be generated like this during the table instantiation :
route('user.edit, [$user->id, 'foo' => 'bar']);
// instead of this way
route('user.edit, ['id' => $user->id, 'foo' => 'bar']);
laravel-table -

Published by Okipa about 5 years ago

  • Added compatibility for Laravel 6.
laravel-table -

Published by Okipa about 5 years ago

  • Added the possibility to add an identifier to a table with ->identifier('your identifier'). This identifier will be used for several things :
    • It will be added as an id (formatted as a slug string) to the table itself.
    • It will be used to automatically customize the following interaction fields sent to the table, in order to be able to interact with a specific table if you have several of them on a single view : rows, search, sort_by, sort_dir.
  • ⚠️ if you have published the views, you will have to re-publish them.
laravel-table -

Published by Okipa over 5 years ago

  • Fixed a use case when no sortable columns are defined and an empty orderBy is called in the SQL request, causing an exception with MySQL
laravel-table -

Published by Okipa over 5 years ago

  • Locked project compatibility to Laravel 5.5+ and PHP7.2+ to avoid issues.
  • Improved code phpdoc for better maintainability.
Package Rankings
Top 5.77% on Packagist.org
Badges
Extracted from project README
Donate Donate
Related Projects