How to echo to console in Laravel and Artisan?

前端 未结 7 1945
鱼传尺愫
鱼传尺愫 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:58

    I like the color added by the Dumper (tested on Laravel 5.3). I think looks a bit nicer than using the echo. The issue I have with the echo out is that it's too easy to be missed, the Dumper it adds a bit of green which catches ones eye:

    public function up() {
         // Migration runs //
         (new Illuminate\Support\Debug\Dumper)->dump("A bit more colorful text");
    }
    

提交回复
热议问题