-
Notifications
You must be signed in to change notification settings - Fork 39
Installation
The grid supports pjax out of the box. For pjax support on laravel, try - spatie/laravel-pjax, or create the middleware on your own using jeffrey way's middleware.
- Bootstrap 3 (for the styling)
- Font awesome (for icons)
- Jquery (required by bootstrap and the package's javascript)
- Jquery pjax (quickly view data without having to reload the page)
- Block UI (optional - to 'block' the UI when doing an AJAX request that might presumably take a while).
- Date picker (optional - for the date filters)
The package is available on packagist. Just run;
composer install leantony/laravel-gridYou can then publish the resources (views) and assets (css & js), incase you need to customize them. The css and js will be copied to public/vendor/leantony/grid
php artisan vendor:publish --provider="Leantony\Grid\Providers\ServiceProvider"You can publish the assets and views separately by passing the
--tagargument to the command. For the argument values, tryassets,viewsorconfigfor js|css assets, views and config respectively. You may also runphp artisan vendor:publishand select the provider index by the nameLeantony\Grid\Providers\ServiceProvider.
When the package is updated, it is highly likely that you will also need to update the javascript assets. To do that, run this command below after an update;
php artisan vendor:publish --provider="Leantony\Grid\Providers\ServiceProvider" --tag=assets --forceYou can also place this command in composer so that it is executed automatically on each update run. Like this;
// ... composer config
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover",
"@php artisan vendor:publish --provider=\"Leantony\\Grid\\Providers\\ServiceProvider\" --tag=assets --force"
]