[Composer] Laravel - How to install using composer?

0 35
composer global require laravel/installer

You can use this command to download the laravel package which can be used to install laravel easily with just a very short command. Simply like:

laravel new blog

where blog is the name of your project.

But before you can use it, you might need to add a symlink of composer/vendor/bin directory in to your linux bin directory (/usr/local/bin or /usr/bin).

Alternatively, you can also use this command (without using the above method):

composer create-project --prefer-dist laravel/laravel blog

This will create a fresh laravel copy into the blog folder in the current directory. You can change 'blog' to any project name you want.

Then, run this command in a separate terminal and you will be able to visit your site in your browser via IP address like

php artisan serve

Thanks for reading!

$ 0.03
$ 0.03 from @TheRandomRewarder
Sponsors of El.Vin