How to echo to console in Laravel and Artisan?

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

    Don't know if you are using Laravel 3 or Laravel 4, and if its also possible in Laravel 3, but i found this in the docs.

    $this->info('Creating sample users...');
    

    EDIT

    If you switch to database seeds you can use this to display a message

    $this->command->info('Creating sample users...');
    

提交回复
热议问题