Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[Laravel specific] Works perfectly if you need to execute an Artisan command AND get the output as a string.
if ( ! \function_exists('artisan_call'))
function artisan_call($command, array $parameters = array())
$buffer = new \Symfony\Component\Console\Output\BufferedOutput();
\Artisan::call($command, $parameters, $buffer);
return $buffer->fetch();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.