laravel-datatables
laravel-datatables copied to clipboard
custom engines in datatables.php config dont work
Summary of problem or feature request
custom engines in datatables.php config dont work
Code snippet of problem
no need, The setting is just ignored and not used.
System details
Latest package and latest laravel
- ubuntu
- 8.3
- 11
- 11
my temporary fix $loader = AliasLoader::getInstance(); $loader->alias(QueryDataTable::class, RedatiQueryDataTable::class);
Can you please provide snippets to reproduce the issue? thanks!
yes, in new instalation
all steps https://yajrabox.com/docs/laravel-datatables/10.0/quick-starter
php artisan vendor:publish --tag=datatables
cp vendor/yajra/laravel-datatables-oracle/src/QueryDataTable.php app/
changue namespace namespace to App;
changue config/datatables to and use use Yajra\DataTables\DataTableAbstract.
'query' => App\QueryDataTable::class,
in App\QueryDataTable::class add " dd(config('datatables.engines.query'));" in construct or modify anything but it will not be reflected in the application
this method is not being called.
vendor/yajra/laravel-datatables-oracle/src/DataTables.php
/** * DataTables using query builder. * * @throws \Yajra\DataTables\Exceptions\Exception / public function query(QueryBuilder $builder): QueryDataTable { /* @var string $dataTable */ $dataTable = config('datatables.engines.query');
$this->validateDataTable($dataTable, QueryDataTable::class);
return $dataTable::create($builder);
}
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been inactive for 7 days since being marked as stale.