Get response from Artisan call

后端 未结 7 1407
情深已故
情深已故 2021-02-18 22:56

When I run in terminal php artisan migrate this results in \'Nothing to migrate\' when indeed there is nothing to migrate.

When I use Artisan::call(\'

7条回答
  •  无人共我
    2021-02-18 23:10

    I'm able to get the output of Artisan::call() with the via the following:

    use Symfony\Component\Console\Output\StreamOutput;
    
    $stream = fopen("php://output", "w");
    Artisan::call("migrate", array(), new StreamOutput($stream));
    
    var_dump($stream);
    

提交回复
热议问题