for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ElfSundae\Laravel\DataTables;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;
class DatatablesServiceProvider extends ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
$this->registerOriginalDataTables();
$this->replaceDataTablesBindings();
}
* Register the original DataTables service providers.
protected function registerOriginalDataTables()
$this->app->register(\Yajra\DataTables\DataTablesServiceProvider::class);
AliasLoader::getInstance()->alias('DataTables', \Yajra\DataTables\Facades\DataTables::class);
$this->app->register(\Yajra\DataTables\ButtonsServiceProvider::class);
* Replace the original DataTables bindings.
protected function replaceDataTablesBindings()
$this->app->alias('datatables', DataTables::class);
$this->app->singleton('datatables', function () {
return new DataTables;
});
$this->app->bind('datatables.html', Html\Builder::class);