Installed Apache, mysql, php7, also downloaded composer, in the folder that I made the "domain" did composer init. Now I want to install Laravel: I do

First download the Laravel installer using Composer.

composer global require "laravel / installer"

I did, then:

laravel new blog

But Laravel writes the command was not found, but the above is

By specifying the ~ / .composer / vendor / bin directory as the PATH, it will be possible to use the laravel command.

How to specify PATH in ubuntu 16?

    2 answers 2

    To find out where the bin , run the command:

     composer global config bin-dir --absolute 

    Setting Environment Variables in Ubuntu: The Right Way
    Simple way. Add to ./.bashrc :

     export PATH="/path/to/composer/bin:$PATH" 

    To update without restarting:

     source ~/.bashrc 
       export PATH="/path/to/dir:$PATH" 
      • 2
        Try to write more detailed answers. Explain what is the basis of your statement? - Nicolas Chabanovsky