Reputation: 5432
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.
Upvotes: 4
Views: 5614
Reputation: 5432
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.
Upvotes: 8
Reputation: 2703
This method worked for me.
@ECHO OFF
php "%~dp0laravel.phar" %*
3.Store the laravel.bat file in the same directory as the downloaded PHAR file (laravel.phar)
4.Include the directory path in your environmental variables.
Then you are good to go.... just launch CMD and test it by typing laravel then hit return
Upvotes: 0
Reputation: 5463
Or just run:
curl -O http://laravel.com/laravel.phar && chmod +x laravel.phar && mv laravel.phar /usr/local/bin/laravel
Upvotes: 4