DataTables warning: table id=vendors – Ajax error. For more information about this error, please see

By | October 30, 2018

I am using laravel 5.4 and php version is 5.6.

I am getting error “Class ‘Datatables’ not found”. I am following standard procedure. I have installed datatable using composer by following command:

composer require yajra/laravel-datatables-oracle:"~7.0"

I added these two lines in config->app file in service provider and aliases:

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

then publish package :

php artisan vendor:publish --provider=Yajra\DataTables\DataTablesServiceProvider

I am using raw query here is my controller code :

function allvendor(){

$sql="my query";
return Datatables::of($results)->make(true);

Leave a Reply

Your email address will not be published. Required fields are marked *