Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Laravel from phar file?

I downloaded the laravel.phar file, renamed it to laravel, moved it to /usr/local/bin, then made it executable by all.

In my home directory, I tried laravel new sandbox, but nothing happens.

What did I do wrong?

Thanks.

like image 270
Geoffrey Avatar asked Dec 11 '22 07:12

Geoffrey


1 Answers

Do not bother renaming the file, and do not bother with /usr/local/bin. Just place laravel.phar in the folder where you are going to use it.

Then make sure you have the PHP curl module installed. On OpenSuse:

sudo zypper install php5-curl

Then create your new Laravel application with the following command (notice you use the php command to execute the .phar file):

php laravel.phar new <project-name> 

e.g. php laravel.phar new sandbox. A new subfolder will be created with the project-name as its name, containing the skeleton of a Laravel application.

like image 84
Geoffrey Avatar answered Dec 16 '22 07:12

Geoffrey