Created
September 16, 2017 16:02
-
-
Save emmanuelbarturen/e51fe32965ae1280e2691b2dfdfe8831 to your computer and use it in GitHub Desktop.
Laravel 5.* Change output color in terminal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Run The Artisan Application | |
|-------------------------------------------------------------------------- | |
| | |
| When we run the console application, the current CLI command will be | |
| executed in this console and the response sent back to a terminal | |
| or another output device for the developers. Here goes nothing! | |
| | |
*/ | |
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); | |
/*Available colors | |
* black,red,green,yellow,blue,magenta,cyan,white,default | |
* */ | |
$output = new Symfony\Component\Console\Output\ConsoleOutput; | |
$output->getFormatter()->setStyle('error', new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'red')); | |
$status = $kernel->handle( | |
$input = new Symfony\Component\Console\Input\ArgvInput, | |
$output | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment