Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with yajra data tables in laravel

Tags:

php

laravel

I'm trying to implement a datatable into my laravel project, I installed yajra datatables in the project and everything ..

I add these to the app.php :

Yajra\DataTables\DataTablesServiceProvider::class,
'DataTables' => Yajra\DataTables\Facades\DataTables::class,

but when I try to make a new datatable using the command

php artisan datatables:make Companies

I get this error : There are no commands defined in the "DataTables" namespace.

any idea how to solve this !!

like image 467
Matlaya D Monaim Avatar asked Sep 13 '25 12:09

Matlaya D Monaim


2 Answers

To fix this, you need to install yajra/laravel-datatables-buttons

so run this command: composer require yajra/laravel-datatables-buttons

reference: https://github.com/yajra/laravel-datatables/issues/1392

like image 145
Eissaweb Avatar answered Sep 16 '25 02:09

Eissaweb


If error:

composer require yajra/laravel-datatables-buttons

You can try:

composer require yajra/laravel-datatables-buttons:*

it works on yajra/laravel/datatables-oracle:9.0

like image 31
Burentugs ChanGeR Avatar answered Sep 16 '25 04:09

Burentugs ChanGeR