class 'yajra datatables datatables' not found laravel

admin_img Posted By Bajarangi soft , Posted On 07-01-2021

Datatables can be configured from config but Generator also gives option to override the option on the fly while generating files,You need to install Datatables in laravel using InfyOm generator according your version .Here we ar installing Data tables and Buttons plugins in laravel 5.8 using infyom generator 5.8.

Yajra datatables not found in laravel

STEP:1:
/laravel-datatables:
click above link run the command in your command prompt

$ composer require yajra/laravel-datatables-oracle:"~9.0"

STEP:2
Register provider and facade on your config/app.php file.
'providers' => [
    ...,
    Yajra\DataTables\DataTablesServiceProvider::class,
]

'aliases' => [
    ...,
    'DataTables' => Yajra\DataTables\Facades\DataTables::class,
]
STEP:3
Configuration (Optional)
$ php artisan vendor:publish --provider="Yajra\DataTables\DataTablesServiceProvider"

STEP:4
DataTables 8.x Upgrade Guide
There are breaking changes since DataTables v8.x. If you are upgrading from v7.x to v8.x, please see upgrade guide

Click the above link and :: Run the below in your commmand prompt step by step
To upgrade Laravel DataTables from version 7.x to version 8.x:
composer require yajra/laravel-datatables-oracle
php artisan vendor:publish --tag=datatables --force
If you are using service approach / buttons plugin:
composer require yajra/laravel-datatables-buttons
php artisan vendor:publish --tag=datatables-buttons --force
If you are using html plugin:
composer require yajra/laravel-datatables-html
php artisan vendor:publish --tag=datatables-html --force
Run the ab ove commands you will get datatables and buttons 

Related Post