11
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

IntelliJでartisanコマンドを実行する

Posted at

IntelliJ 15 上でartisanコマンドを実行するよ
多分PhpStormでも同じだよ

準備

artisan
require __DIR__.'/bootstrap/autoload.php';

の前に

artisan
if (isset($argv[1], $argv[2]) &&
    $argv[1] === 'list' &&
    $argv[2] === '--xml'
) {
    $argv[2] = '--format=xml';
    $_SERVER['argv'] = $argv;
}
require __DIR__.'/bootstrap/autoload.php';

って感じに追加。

cf: [L5.1] Artisan Not working in Command Line Tool - PhpStorm

IDEの設定

Preference > Plugins
Command Line Tool Support ってプラグインをインストール

Preference > Tools > Command Line Tool Support
プラグインの設定から、+でコマンドを追加
「Choose tool」は「Tool based on Symfony Console」を選択
「Visiblity」は「project」
スクリーンショット 2016-02-23 1.52.27.png
次はartisanの実行ファイルを指定。さっき編集したのを選べば良い。
スクリーンショット 2016-02-23 1.52.53.png

つかう

Tools > Run Command...
もしくはショートカットで呼び出す。
スクリーンショット 2016-02-23 1.56.04.png
「artisan」まで入れれば候補が出るよ!やったね!

11
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?