I am using "yajra/laravel-datatables-oracle": "~9.0", however I keep getting error
Class 'Yajra\DataTables\DataTablesServiceProvider' not found , i tried switching to lower case 't' in datatables , however it is still showing me
Class 'Yajra\DataTables\DataTablesServiceProvider' not found
I have tried to run php artisan config:cache, php artisan cache:clear. all is still showing me Class 'Yajra\DataTables\DataTablesServiceProvider' not found
Kindly advise
config/app.php
Yajra\DataTables\DataTablesServiceProvider::class,
'Datatables' => Yajra\DataTables\Facades\DataTables::class,
Thank you
run this:
php artisan vendor:publish --tag=datatables
also, check this link for more information
Run
$ php artisan clear-compiled
$ composer dump-autoload
$ php artisan optimize:clear
and check
Make sure that you're importing the DataTable class with the correct upper/lower case in your files, lowercase since you're creating that way the alias Datatables
Related
I installed a fresh install or laravel "^8.75" and backpack "^5.3" and when I run "php artisan backpack:crud User" I get this error:
BadMethodCallException
Method Illuminate\Support\Stringable::lcfirst does not exist.
Does anyone know what the issue might be ? I cannot find a solution online.
I've just submitted the PR to fix this, we are using lcfirst as part of Laravel Str::class and that's not available in L9, so the error raises.
It should be fixed, merged and tagged during today.
You can follow the PR here: https://github.com/Laravel-Backpack/Generators/pull/149
Cheers
I tried these commands:
php artisan config:cache
php artisan route:cache
php artisan cache:clear
All of them return me error:
Class 'App\Providers\InvitationServiceProvider' not found
But I dont have InvitationServiceProvider anywhere in project.
So, how to rebuild Laravel?
Also I tried composer dump and php artisan serve
Dump is:
PS C:\Projects\secure> composer dump-autoload -o
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover --ansi
In ProviderRepository.php line 208:
Class 'App\Providers\InvitationServiceProvider' not found
Script #php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
The correct name of the command is
composer dump-autoload
Don't know if you tried that one.
And also the service providers are usually registered within the config\app.php providers array, so take a look in that file and remove it from there too.
Or remove manually the bootstrap\cache\packages.php file.
EDIT:
From your dump it is obvious that you have the service provider registered in the config app file, so you tried to cache the config, try to clear the cache if you haven't tried the manual way yet:
php artisan config:clear
I would really appreciate comments after someone downvotes an answer, this way I don't understand what is wrong in the answer.
Try it
Make sure :
You have a file named InvitationServiceProvider inside App\InvitationServiceProvider.
The class InvitationServiceProvider is namespaced correctly.
You didn't change the app namespace.
//after that run the bellow comments
composer dump-autoload or composer update
You have tried registering your provider under 'providers' array of /app/cofig/app.php
and then You have to do this do a
composer dump-autoload -o
I followed the steps mentioned here:
How to remove a package from Laravel using composer?
including the step: Remove Service Provider from "app/config/app.php" (reference in "providers" array)
However, since I got an error:
In ProviderRepository.php line 208:
Class 'Ckeditor\CkeditorServiceProvider' not found
Script #php artisan package:discover handling the post-autoload-dump event returned with error code 1
The app is down and I cannot do any operation in terminal. How to get rid of the reference to this class?
Then run these commands.
php artisan cache:clear
composer dump-autoload -o
If an error occurs while clearing cache, then delete cache files under bootstrap/cache manually.
I am currently working on L5.5 and there for generating api docs I have installed this package, now I don't need that package I decided to uninstall it but while doing uninstalling I got this error.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Mpociot\ApiDoc\ApiDocGeneratorServiceProvider' not found
Script #php artisan package:discover handling the post-autoload-dump event returned with error code 1
I checked on repo's issue and on net but haven't got satisfying answer.
I uninstalled this repo by doing following this
remove repo from composer.json and then I ran the command composer update.
Any idea why it is appearing and how to fix this error??
Thank you for your efforts :)
I have removed the mentioned file still I am getting this error
Go to config/app.php and make sure you removed
Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class
from this. Now run:
php artisan clear-compiled
and
php artisan config:clear
to make sure you are not using any cache. After that there shouldn't be any problems
NOTE
if you are getting this issue even after this then go to bootstrap/cache/config.php as mentioned by Marcin NabiaĆek down there in comments and in that delete Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class from the array of providers after that rerun the above three commands.
I wanted to install teepluss/theme so I added it to my composer.json
but now I get this error:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'SuperClosure\Serializer' not found
I was capable to solve the first error by adding >"jeremeamia/superclosure": "^2.0"
but now when I add >Teepluss\Theme\ThemeServiceProvider::class, in app.php providers I get a new error :
> [ErrorException] Illegal offset type in unset
here's what i got in the script in composer.json
If you already run composer update, you can try run this script
php artisan config:cache
and
php artisan cache:clear.It can help you resolve that problem