Format Laravel Artisan command output.
This package requires:
- PHP >= 7.0.0
- Laravel >= 5.5
Install the package via Composer:
composer require tfhinc/artisan-format
The package will be found via auto discovery. You may also add the service provider in app/config.php
:
TFHInc\ArtisanFormat\ArtisanFormatServiceProvider::class,
Publish the artisan-format.php
configuration file to your config/
directory:
php artisan vendor:publish --provider="TFHInc\ArtisanFormat\ArtisanFormatServiceProvider"
Artisan Format provides a series of Traits that can be used within your Artisan command classes.
The Sections trait produces distinct sections of text in your command output.
Include the ArtianFormatSections
trait in your command class:
use TFHInc\ArtisanFormat\Traits\ArtisanFormatSections;
class Run extends Command
{
use ArtisanFormatSections;
Generate a Section with a Header and Content:
$this->sectionBox('Standard Section Box Header', 'Standard Section Box Content');
Output:
The MIT License (MIT). Please see License File for more information.