How to echo to console in Laravel and Artisan?

前端 未结 7 1964
鱼传尺愫
鱼传尺愫 2021-02-03 21:02

I was curious, I\'m using Laravel and Artisan for my migrations. Is there a method to output information to the console? I can\'t seem to find any information on this. For examp

7条回答
  •  终归单人心
    2021-02-03 21:57

    Since the chosen answer doesn't seem to work since 4.2, I say just keep it simple:

    public function up() {
         // Migration runs //
         echo 'Records processed' . PHP_EOL;
    }
    

提交回复
热议问题