Laravel 5.5 install not generating .env file - laravel

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.

Related

Can not download Laravel UI package

I want to download Laravel UI package via composer and I have got this error
Seems like due to internet issue you can't access packagists site (which composer uses to get the packages) which is causing the installation to fail.
run a fresh composer create-project laravel/laravel command, copy replace your composer.json content with the old projects composer.json. Do the same with .env file
and run composer install. then u can run "composer require/laravel/ui"

Cannot install Laravel correctly

I followed all the instruction by installing composer and then Laravel. Also I did everything what was shown in laracast series for installing Laravel and composer.
BUT I have some problems and I cannot solve them:
I don't have Vendor folder in my Laravel app folder
I cannot launch command 'composer artisan' as it says that
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "artisan" is not defined"
"php artisan" also doesn't work
All the answer in the web I have already tried to resolve my problems but nothing worked for me
Please, tell me, how can I install Laravel correctly and use it without errors
Run composer install or composer update. This will create the vendor folder and download all the dependent modules as mentioned in the composer.json
I want to add some more details which are asked but not clearly answered.
You did not install the composer dependencies. Try composer install.
It is not composer artisan. If you execute that command, you say hey composer! run your artisan command. And it says "Command "artisan" is not defined."
It is php artisan. But if you don't run composer install, php artisan will not work either. Because you are missing Symfony Console Component in your project (not the one used by composer) as well as a complete Laravel installation. Both will also be installed by the composer install command.
Well. I've solved my problem. As I mentioned before I had tried all the answer in the web but nothing had helped me. So then I just deleted my laravel project and ran this command
sudo apt-get upgrade
After some time packages were upgraded and I created new Laravel project. And Laravel started working perfectly! So in any incomprehensible situation do apt-get upgrade :))

how to make php artisan command available?

I read previous posts here about same problem but they did not solve my problem. I am running wamp latest version on windows 7 and I cloned a laravel app from github then I ran composer install on the root folder of the app and all vendors installed. however I still can not execute php artisan list on the app root folder
I tried also this command
composer global require "laravel/installer=~1.1"
but same problem also there is no laravel folder installed inside vendor folder. I dont know what laravel version used with this web app
So how I can make php artisan work ?
Update:
I opened composer.json file and I found no Laravel frame work to install !! should I return to the developer who made this or I just add Laravel package to composer.json and run composer install again ? if so what I should add to the composer.json ? I dont know which version to install !!
Your project has to have an artisan file in the root directory, otherwise the php artisan command won't work.
I had a similar issue. Fixed it by using the following command, which results in a clean installation.
composer create-project --prefer-dist laravel/laravel my-project
If errors occur, your CLI will show them.
Docs

Laravel 5.2 - Installing intervation image error command

i'm tryng to install intervation image in my laravel project 5.2, i'm tryng install by composer like this:
$ php composer.phar require intervention/image
but composer give me an error like the image:
i don't know why, there other way to install it? or fix this issue?
thank you for your support!
Step 1
First type composer in you command prompt, check if composer is installed or not. you should see something like that.
If this is there then composer is installed goto Step 2 , otherwise install the composer from here
Step 2
For intervention image
go to your root directory of laravel project
run command composer require intervention/image
It will download the latest version of composer
after installing go to your config/app.php
in provider array add
Intervention\Image\ImageServiceProvider::class
in alias array add
'Image' => Intervention\Image\Facades\Image::class
after installing run command php artisan config:publish
it will copy the intervention config file to your config directory.
Hope this will help.
No need of adding $ at the beginning.
Just use:
php composer.phar require intervention/image
$ in documentation indicates that the command is to be run in a terminal ( usually Linux ).
Add this line to your composer.json, then run composer update.
"intervention/image": "2.*"

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

Resources