Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm Startup task - php artisan serve

I am working with a project locally and I want to run "php artisan serve" with the PhpStorm's startup task feature every time I start the project.

I went to Settings -> Tools -> Startup Tasks and clicked the green plus, then Add New Configuration. However, I don't know what to choose from there. There is no "artisan" option there.

How should I do it?

like image 878
SimeriaIonut Avatar asked Jun 02 '16 09:06

SimeriaIonut


2 Answers

Artisan is a php script so you can simply add a new PHP Script task:

File: Browse to you project directory and select artisan.

Arguments: serve

If your php interpreter is setup correctly in your PHPStorm settings, then you will be able run this task and it will automatically run at startup.

like image 101
xjmdoo Avatar answered Nov 19 '22 23:11

xjmdoo


Where do I add this PHP task? – Brad

phpstorm > 2020.3

  • File:

path/to/artisan

Usually is at root directory of the Laravel project.

  • Arguments:

serve

enter image description here

Older Version of PHP | phpstorm 2017.2 <

File -> Settings... -> Tools -> Startup Tasks -> +(Add) -> PHP Script

Name: serve

Single instance only - checked

like image 44
AlexSi Avatar answered Nov 19 '22 23:11

AlexSi