PhpStorm: easily create new Laravel project

Today I want to tell about another “trick” – or how to create a Laravel project without Command line or Terminal, directly from PhpStorm.

Just go to File -> New Project and in the dialog specify project name and folder, and – most importantly – choose type Composer Project.

0923_laravel_phpstorm_01

Then you will see a new dialog, where you can basically choose any packages that you want Composer to download and install automatically. In this case we choose laravel/laravel (use auto-complete above), and then PhpStorm shows available versions on the bottom right, so we can specify which one we want.

0923_laravel_phpstorm_02

Important things here – you have to specify path to php.exe executable on your computer (at the bottom) and you can also specify where you have composer.phar installed (at the top) – alternatively, it can be downloaded automatically by PhpStorm.

And, basically, that’s it – then PhpStorm downloads all the packages that you listed, then takes care of their dependancies and performs all other necessary operations. See comments at the bottom.

0923_laravel_phpstorm_03

0923_laravel_phpstorm_04

0923_laravel_phpstorm_05

0923_laravel_phpstorm_06

And then – the final result: ta-daaaaa!

0923_laravel_phpstorm_07

So that’s it, another “well hidden” feature of PhpStorm. Laravel is only one way of using Composer project – you can specify more required packages with Laravel, or use your own different package list as a starting point.

Like our articles?
Check out our Laravel online courses!

8 COMMENTS

  1. Since 2012 I am using Laravel for my projects and I just Love it !!! Thanks for sharing such information, Definitely I will try it on PhpStrom, previously I was using command terminal for Creating Laravel Project… Hope we will get more future tips like that….

  2. When I tried running a laravel project that I created using your tutorial, I get this error:

    PHP Fatal error: Class ‘Doctrine\Tests\DoctrineTestCase’ not found

LEAVE A REPLY

Please enter your comment!
Please enter your name here