Download the PHP package thenandan/grids without Composer
On this page you can find all versions of the php package thenandan/grids. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package grids
Grids
Data Grids Framework for Laravel
This package is forked from Nayjest/Grids and is wrapper for the package, does not support (laravel < 5) and used bootstrap 4 by default.
Requirements
- Laravel >= 5+
- php >= 7.1
- bootstrap 4
- fontawesome 5
Installation
Publishing Assets
Creating the Grid Class
This will generate the CompanyGrid class as below -
Now we are going to configure our grid as below -
That's all, our grid is configured.
Rendering the Grid in UI
Create a blade(view) file (ex. company.blade.php) and include the grid in it. see below example -
Note
Make you to add the below in your main layout -
-
In you header -
- Before closing the body tag -
Now create you route and return the company view. You will see a grid something similar to following.
Available Grid Methods
- setGridName($name) - Set the name of the grid
- setDefaultPageSize($number) - Set the default page size.
- setCachingTime($timeInMinute) - Set the caching time in minute.
- addColumn($column, $label = false, $relation = false) - Add a new column in grid.
- setRecordsPerPage(array $recordsPerPage) - Set records perPage dropdown list.
Available nested column methods
- setSortable() - When used column becomes sortable
- setCallback($function) - Can be used to customize the value of the cell
- shorten(int $noOfChar = 20) - Can be used to limit the no. of character in the grid cell, When used below methods become available
- setTitle() - Set the cell original value in html title attribute
- setToolTip($isHtml = false) - Set the cell original value in tooltip
- setPopover($isHtml = false, $title = null) - Set the cell original value in a popover, Here $title variable can be used to set the title of popover
- setLink($link, $name) - Can be used to set a link
- setSearchFilter($operator = TheNandanGrid::OPERATOR_LIKE) - Can be used to make the column searchable
- More methods are coming soon -
License
© 2020—2020 Keshari Nandan
License: Proprietary
All versions of grids with dependencies
laravelcollective/html Version v6.*
illuminate/support Version >=4.2
nayjest/builder Version ~2