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(\'
Yes, it's possible. To get the output of a built-in artisan command from inside a custom command, pass the OutputStream
from your command into the Artisan::call
. Example:
class MyCommand extends \Illuminate\Console\Command
{
public function fire()
{
\Artisan::call('optimize', [], $this->getOutput());
}
}