Ubuntu: difficulties creating laravel projects


I got laravel 4, composer installed, PHP 5.4 and mcrypt running but typing the command:

$ php artisan serve   Could not open input file: artisan  

Any attempts to create a new project with command:

$ composer create-project laravel/laravel your-project-name --prefer-dist                             [RuntimeException]                   The "-p" option does not exist.                                     create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [package] [directory] [version]  

I need help to work through my project please.


Try this

composer create-project laravel/laravel project-name ~4.2.0 --prefer-dist  

~4.2.0 means that you will get the latest version with 4.2.*


I think you had not changed to laravel folder. It contains the artisan file. "Could not open input file" error came because it was not present in current directory.

You can try php /var/www/laravel/artisan serve

Here, php is what you used to access this input file.

Otherwise, change you directory : cd /var/www/laravel

and then try again. Please report again if it didn't work. Thanks.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »