LoginSignup
2
3

More than 5 years have passed since last update.

CakePHP3でCakeShellを作ってみる

Last updated at Posted at 2016-01-07

CakePHP3でCakeShellを作ってみる

1. Shellファイルを作成する

 app/src/Shell/HogeShell.php

2. Shellファイルを作成する

<?php
namespace App\Shell;

use Cake\Console\Shell;

class HogeShell extends Shell {

    /**
     * Shellだよー
     */
    public function main() {
        $this->out('開始');
        // 何かしらの処理
        $this->out('終了');
    }
}

3. 動かす

$ ./bin/cake Hoge

4. 結果

無題.png

2
3
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
2
3