Laravel 8 + backpack throws error on "php artisan backpack:crud User" - laravel

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

Related

When I login then error will be ocuurred "It was not possible to parse your key, reason". (Laravel api)

{"message": "It was not possible to parse your key, reason: "}
I also tried composer update command and composer require laravel/passport and php artisan passport:install.
But the same error is still occurring. Please suggest me what is the solution for this error.
If I changed the version of PHP and it's work.

Laravel Yajra datatables not installing

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

Laravel - compact(): Undefined variable: operator in Builder.php

I have PHP version-7.3 installed in my system and Laravel-5.8. When I tried to rub composer install or composer update on an old Project with Laravel-5.4 and PHP Version-5.6.4, I got this error shown below:
In Builder.php line 1229:
compact(): Undefined variable: operator
Script php artisan optimize handling the post-install-cmd event returned with error code 1
Then, when I tried to run the application, I got this error page as shown on the screen:
I tried to run:
php artisan cache:clear
and
composer update
but the problem is still there.
How do I get it resolved?
Thank you.
It looks like this issue was fixed in Laravel 5.5 according to this post: https://github.com/laravel/framework/issues/26936#issuecomment-449479336
Since Laravel 5.4 is no longer supported, your best option might be to upgrade. You can find a list of the currently supported versions here: https://laravel.com/docs/releases
The minimal upgrade that should still fix the error would be 5.4 to 5.5. The instructions can be found here: https://laravel.com/docs/5.5/upgrade#upgrade-5.5.0 (please note that support for 5.5 has also ended, but it might still fix your bug). This would also require you to switch the project to PHP 7.0.0 or greater.
If:
You can't upgrade for whatever business/team related reason and
Are sure that the Homestead box is running the correct version of PHP (7.2 or lower based on the answer given here) and yet
are still getting this error,
explicitly define the PHP version on the Homestead.yaml file. This should be done on the sites property as such (each is a new line, of course):
map: test.appp
/home/vagrant/code/test/public
php: "7.1"

Class 'Mpociot\ApiDoc\ApiDocGeneratorServiceProvider' not found

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.

anyone got an error i get while installing teepluss/theme in laravel

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

Resources