Trait 'Carbon\Traits\ObjectInitialisation' not found laravel5.8 - laravel-5.8

Getting this error when i run project on local
tried -composer update, composer update --no-scripts

Solved this issue by deleting vendor folder from project and the using composer update solved my problem

Related

Laravel 5.5 install not generating .env file

I have installed laravel 5.4 multiple times.
Now I'm trying to install laravel 5.5 using same command And it doesn't work.
composer create-project --prefer-dist laravel/laravel blog dev-develop
It doesn't seem to have any errors on installation, only lot of suggestions.
But no key is generated and no .env file is created.
When I try to make php artisan key:generate
/public_html/blog/.env): failed to open stream: No such file or directory
Got the same problem days a go, the problem was because composer was not updated, solved it updating composer, you can run:
composer self-update
Or you can download the latest version there, then you can create the project again and the .env file will be automatically created.
I have this version
Composer version #package_branch_alias_version# (1.0.0-beta2) 2016-03-27 16:00:34
When I run composer self-update I get
[InvalidArgumentException]
Command "self-update" is not defined.
shell command: cp .env.example .env
If you just want to make current setup work, just try doing the following:
cp .env.example .env
php artisan key:generate
But as suggested by one of the answers here, you should update your composer if you have an old version. To check your installed version, do so with composer -v
This is happening because of your Laravel Installer or Composer version. I have faced the same problem and found following 2 different solutions:
Generally, you can solve with by running composer global update command and then run composer update command from your project directory. This solution basically updates your installer and then your project.
If still, you have this problem, then you need to run composer self-update command first and then run composer update command from your project directory. It will update your composer version and then your project.
Hope this information will help you to fix.

I get an error when installing laravel or when I try updating composer. How do I resolve it?

I get this error
"require(/var/www/html/data_security/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/data_security/bootstrap/autoload.php on line 17"
when installing laravel or when I try updating composer. How do I resolve it?
For fresh installation you will need to run composer install instead of composer update. I faced similar issue and composer install did the trick for me.

Class 'Illuminate\Foundation\Application' not found

I'm just simply run composer update command and than my hole project is stop and show the
Class 'Illuminate\Foundation\Application' not found
I tried to run many command but not work.
like-
composer update --no-scripts
composer install
composer dump-autoload
Please help.
To solve the problem, delete composer.lock and the vendor folder and run the command composer install.
If you added to your composer.json dependencies, please delete this, because can be the cause of the error.

Class 'Monolog\Logger' not found, installation error in Laravel 4

I installed Laravel without using composer with typing this command:
C:\wamp\www\travail>laravel new project
It seems that it is on the good way.
Creating application...
Application ready! Build something amazing.
But when I tried to open my project here:
wamp-->localhost-->travail-->project-->public
I got this error:
Class 'Monolog\Logger' not found
I solve this issue by doing the following:
Check the minimum-stability value in composer.json and set it to stable:
"minimum-stability": "stable"
Update you composer:
composer self-update
Re-run composer udpate:
composer update
Then run any artisan commands and enjoy coding!
According to this thread. Change minimum-stability from dev to stable in composer.json, then run an update. Also try to do a dump-autoload.
Finally it works for me after running these two commands:
composer self-update
Then:
composer update --no-scripts

Composer update not working

When I try composer update, I'm getting this:
When I try php, it's working and it's in my path.
Any help?
There was an error in the composer.json which belonged to the project where I was trying composer update
After removing # it started working normally.

Resources