Download the PHP package mikelmi/mks-smart-table without Composer
On this page you can find all versions of the php package mikelmi/mks-smart-table. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mks-smart-table
Server side processing for angular-smart-table for Laravel 5
This package provides services for server-side processing data for angular-smart-table
Installation
-
Install via composer
-
Add the service provider in
config/app.php
, toproviders
: - Publish assets
Usage
Server side
Create route for handling smart-table-request.
Inside the route:
-
Create data source. It can be Query Builder (Eloquent/Database) or Collection
-
Create SmartTable Engine instance
-
Apply request
- Return the response
Client side
-
Include javascript file. This package ships with three js files:
mks-smart-table.js
- contains only base functionality, without any librariesmks-smart-table-st.js
- includes angular-smart-tablemks-smart-table-full.js
- includes all required dependencies (angular 1.x and angular-smart-table)
E.g. (in your template):
-
Add
mks-smart-table
dependency to your angular application. E.g.: -
Init controller TableCtrl
-
Output the table
-
Advanced features:
-
Global search
You can add some input outside the table for filtering the results
And then add
mst-watch-query
directive to the table head -
Select rows
-
'Select All' checkbox
- TableCtrl functions
removeLocalRow(row)
- remove row without server-side actionremoveRow(row, url, confirmText)
- remove row after server-side action by urlremoveSelected(url, confirmText)
- remove selected rows after server-side action by urlgetSelected()
- get selected rowsupdateRow(row, url, confirmText)
- post row by url and update it with returned dataupdateSelected(url, confirmText)
- same asupdateRow
but works with array of selected rows
-
Additional Info
There is no styles for the tables in this package. You can Twitter Bootstrap for styling it.
Here https://github.com/mikelmi/mks-smart-table/tree/master/example you can check the example of usage this package.
For more information about client-side implementation please visit the angular-smart-table site - https://lorenzofox3.github.io/smart-table-website/