[Composer] Laravel - How to install using composer?

0 27
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 127.0.0.1:8000.

php artisan serve

Thanks for reading!

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

Comments