Download the PHP package rafwell/laravel-simplegrid without Composer
On this page you can find all versions of the php package rafwell/laravel-simplegrid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rafwell/laravel-simplegrid
More information about rafwell/laravel-simplegrid
Files in rafwell/laravel-simplegrid
Package laravel-simplegrid
Short Description A simple component for generating powerful grids with Laravel.
License MIT
Informations about the package laravel-simplegrid
About this project
rafwell/laravel-simplegrid is a component for build powerful grids, with less code. The component is ready to work with Bootstrap 3, have features to export to xls, csv and pdf, simple/advanced search, ordenation, actions inline or bulk.
Compatibility
rafwell/laravel-simplegrid is compatibly with Laravel 5.2+
Instalation
- Add the dependency to your composer.json or .
- Execute .
- Add to your our service provider:
- Execute
- Include in your html the js and css dependencies.
Dependencies
This package was written to work with bootstrap 3 and Jquery. We need the following dependencies:
- Datetimepicker, for advanced search in date and datetime fields.
- Moment, for Datetimepicker work.
Properly we added to our package those dependencies. You can add this from your , like that:
CSS Files
JS Files
An simple example
In your controller:
In your function:
In your view:
The result will be like this:
A more complex example
Change the code of your controller to:
The result will be like this:
The advanced search allow you search field by field. The rendered is like this:
Your model has relationships? Try it:
Mutators
All mutators get of the principal table will work normally when the renderer called. For personalize or trait an line before show, for make an visual concatenate or formatter, you can use the method:
In some case, some actions cannot be called. For example, if you cannot allow edit button if the status is equal 2:
Extra Configurations
After you publish the our service provider, will apear in your config folder a file named . In him, you can change the standard of date and datetime fields of advanced search, the initial value of 'showing x rows per page' and more!
Language
This package is multi-language. We use the location of you laravel instalattion, configured in your . If we have the translation this will be automatically loaded. You can see the currently supported languages in our lang folder.
Disclaimer
This repository is new, 'forked' from rafwell/laravel-grid. The original repository does not contemple multi-language features. It has been discontinued in favor of this.
Contribute
If you want contribute, you can open issues to discussion.
License
The MIT License (MIT). Please see License File for more information.
Breakingchanges log
- Since the version 2.0 we have added an html-sanitizer by default. This can break your code if you are showing some specific html entities in your grid. Note thatn on the version 1 was your responsability prevent that. If you are not sanitizing your data before renderi it, they can be unsafe, you can be vulnerable to attacks XSS. We highly recommend all you to update to the version 2.0, the default tags allowed is very common, rarely will affect your code.
All versions of laravel-simplegrid with dependencies
box/spout Version ^3.3
tgalopin/html-sanitizer Version ^1.4
barryvdh/laravel-snappy Version ^1.0