getting error after checkout a new branch in Laravel - laravel

I am working on Laravel project.
I checkout new branch and it gives error "
Symfony \ Component \ Debug \ Exception \ FatalErrorException
Class 'Pimple' not found
"
it display the error file as 'elasticsearch/elasticsearch/src/Elasticsearch/Common/DICBuilder.php'
I run composer update,composer self-update and composer dumpautoload and it wasn't help.
Can anyone help me?

Remove dir vendor/elasticsearch and then run composer update. If you still get error, then package elasticsearch/elasticsearch is broken. You can remove package from your project in composer.json.

Related

"Class 'ConsoleTVs\Charts\Facades\Charts' not found"

Please note that, I'm using rappasoft updated boilerplate Laravel 5.8 and I'm using your installation steps but it's giving me this error message:
Class 'ConsoleTVs\Charts\Charts' not found
they forgot to add install charts dependency through composer try this
composer require consoletvs/charts
this will install your missing dependency

how to fix error in laravel 5.2

i just doing now laravel 5.2 steam authentication
i am followed this link
https://github.com/invisnik/laravel-steam-auth## Heading ##
i got a error in composer
"Invisnik\LaravelSteamAuth\SteamServiceProvider::class class not a found"
i have add the composer.json file in
"invisnik/laravel-steam-auth": "2.*"
and composer install and then add
app.php
Invisnik\LaravelSteamAuth\SteamServiceProvider::class,
but this error will be display
"Invisnik\LaravelSteamAuth\SteamServiceProvider::class class not a found"
how can fix this error.
You need to import the class or declare it on the fly using by adding a backwards slash
\SteamServiceProvider
Eg:
\SteamServiceProvider::method()
And if you are adding a new package, make sure to run the following composer command to recatch the files.
composer dump-autoload

package has corrupted project

I installed this package which has corrupted my project I have removed the package completely from the composer.json file and done a composer update I also have removed any code that references that package and I'm still getting this error
FatalErrorException in
50315282edd449c1ae6f735378f3cdd304559dde.php line 93:
Class 'Share' not found
chencha/share errors Share class not found:
Provider
Chencha\Share\ShareServiceProvider::class,
Alias:
'Share' => Chencha\Share\ShareFacade::class,
If you actually deleted all references to the package then it can be a cache problem.
Try:
composer dump-autoload && php artisan clear-compiled

Laravel 5 command php artisan... Parse error: syntax error, unexpected ':'

I was working on composer and perfect. with artisan methods I created many things.
then he was working on routes and wanted to create a Controller.
php artisan make: controller UsersController
and displays the following error
[Symfony \ Component \ Debug \ Exception \ FatalThrowableError]
Parse error: syntax error, unexpected ':'
I wanted to try commands before if they worked and did not work
you uninstall and install composer and error everywhere, not to update, install etc.
always appears the error ':'':'':'':'
[Symfony \ Component \ Debug \ Exception \ FatalThrowableError]
Parse error: syntax error, unexpected ':'
thank you for your help
I think its due to the space between 'make:' and 'controller'. I generally use 'php artisan make:controller UserController'.

Composer error installing laravel-cors

I tried to install laravel-cors
composer require barryvdh/laravel-cors
It installed successfully or so I thought, but then when I went to publish the config I get this error:
[RuntimeException]
Error Output: PHP Fatal error: Cannot redeclare Composer\Autoload\includeFile() (previously declared in /www/vendor/composer/ClassLoader.php:410) in /www/config/vendor/composer/ClassLoader.php on line 413
I have tried removing laravel-cors and I still get this error. I have dumped autoload as well. What am I missing?
Larval 5.2 | PHP 5.6.17
I figured it out. When i typed
composer require barryvdh/laravel-cors
i was in a sub directory. so composer then installed it and the dependencies in a sub directory which is why i was getting that error. If you look closely you can see that it was installing in config
/www/config/vendor/composer/ClassLoader.php:413
/www/vendor/composer/ClassLoader.php:410
Just needed to pay better attention to detail.

Resources