abbert / datagrid
PHP DataTables backend
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
1.1.2
2020-10-27 10:20 UTC
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:3000in example/public - Navigate to http://localhost:3000
- Make your changes
- Create a pull-request