Correct way to install Laravel on Linux

1

I'm starting in the Laravel Framework and I'm having some problems with installing on Linux. I made the installation by composer using the command php composer.phar global require "laravel / installer" , set the $ PATH path export PATH="$ PATH: $ HOME / .config / composer / vendor / bin " and I ran the laravel new blog command that after running shows the text" Crafting application ... sh: 1: composer: not found Application ready! Build something amazing. "When you run the command php artisan serve it shows in the browser the" Whoops, looks like something went wrong. "

After that I tried to create the project with the php composer.phar create-project --prefer-dist laravel / laravel blog command, I started the server and it loaded into the browser without error .

How do I create a project using the 'laravel new proj' command so that there is no error in creating the project and when starting the server?

** I'm using php 7.

    
asked by anonymous 11.03.2017 / 04:28

1 answer

1

Do you have the composer.phar set in the environment variables too?

Try adding the composer executable to get global access on the terminal, something like:

cp /seu/caminho/composer.phar /usr/bin/composer

And see if it took effect, trying to run from the command line

composer -v

This should show the composer version used

    
11.03.2017 / 14:47