yajra / laravel-datatables

jQuery DataTables API for Laravel
https://yajrabox.com/docs/laravel-datatables
MIT License
4.76k stars 858 forks source link

Command "datatables:make" unknown? #3186

Open anxgstadler opened 1 month ago

anxgstadler commented 1 month ago

Summary of problem or feature request

I added the core datatables extension to a laravel project: composer require yajra/laravel-datatables-oracle:"^11.0"

And then tried the command to create a new datatable: php artisan datatables:make MyTest

Resulting in the error: ERROR There are no commands defined in the "datatables" namespace.

I don't know if this is a little left-over from splitting the package into a core package and some smaller extensions, but there seems to be something missing here...

System details

anxgstadler commented 1 month ago

Update:

Not being able to use the artisan command to create a datatables, I went on to use the UsersDataTable source code as astarting point from here: https://yajrabox.com/docs/laravel-datatables/11.0/quick-starter#setup-users-datatable

But this also does not work, because in the line use Yajra\DataTables\Services\DataTable; this class does not exist.

May I ask you to please update the documentation so it matches the new code? As it stands currently, especially for people who are using the package for the first time, the documentation has lots of errors and is hardly of any help. Thanks! :-)

yajra commented 1 month ago

Please use the all-in-one installer: composer require yajra/laravel-datatables. The make command is part of the laravel-datatables-buttons package.

anxgstadler commented 1 month ago

Hi, Yajra, thanks for your quick reply! I will do as advised - although I went with only the core package (and HTML) as "buttons" is exactly the feature I will not need :-D