PhpStorm Startup task - php artisan serve

淺唱寂寞╮ 提交于 2019-12-31 02:55:46

问题


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?


回答1:


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.




回答2:


Where do I add this PHP task? – Brad

phpstorm 2017.2

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

Name: serve

Single instance only - checked

File: path/to/artisan

Arguments: serve



来源:https://stackoverflow.com/questions/37587559/phpstorm-startup-task-php-artisan-serve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!