We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Ever wondered how to create the same output as for example the artisan about
command?
When you run artisan about
, you get a nice overview like this:
It turns out that it's quite easy to achieve the same output.
The green titles are outputted like this:
$this->components->twoColumnDetail(' <fg=green;options=bold>Environment</>');
The key-value pairs are outputted like this:
$this->components->twoColumnDetail('Application Name', '🐥 YellowDuck.be');
The newlines can be done with=
$this->newline();
Please note that these methods are only available in classes extending
Illuminate\Console\Command
.
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.