abbert / datagrid
PHP DataTables backend
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 7 852
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 3
Open Issues: 0
Requires (Dev)
- doctrine/orm: ^2.4.0
README
Installation
Use composer to install the package
composer require "abbert/datagrid"
Usage
require 'vendor/autoload.php';
use Abbert\Datagrid\Datagrid;
use Abbert\Datagrid\DataSource\DoctrineSource;
$datagrid = new Datagrid();
$datagrid->setDatasource(new DoctrineSource($repo));
$datagrid->addColumn('#', function ($row) {
return $row->getId();
});
$datagrid->render();
echo $datagrid;
Todo
- More data sources
- More columns
- Improve ActionColumn
- Improve configuration
- Write tests
License
See LICENSE
Contributing
- Fork the project
- Clone the repository
- Run
composer install
- Edit example/app/config/db.php
- Go to to example
- Run
../vendor/bin/doctrine orm:schema-tool:update
- Run
php -S 0:3000
in example/public - Navigate to http://localhost:3000
- Make your changes
- Create a pull-request