问题描述
我正在本地处理一个项目,并且每次启动项目时,我都希望使用PhpStorm的启动任务功能来运行"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.
我应该怎么做?
推荐答案
Artisan是 php脚本,因此您只需添加一个新的 PHP脚本任务即可:
Artisan is a php script so you can simply add a new PHP Script task:
文件:浏览至您的项目目录,然后选择工匠.
File: Browse to you project directory and select artisan.
参数:服务
如果在PHPStorm设置中正确设置了php解释器,那么您将能够运行此任务,它将在启动时自动运行.
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.
这篇关于PhpStorm启动任务-PHP ArtisanServ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!