A mixin for Laravel's Stringable
to easily apply colors and styles to CLI text.
You can install the package via Composer:
composer require jbrooksuk/laravel-colorize
Make the text blink.
Str::of('Hey Laravel')->blink();
Make the text bold.
Str::of('Hey Laravel')->bold();
Colorize the text. Foreground, Background.
Str::of('Hey Laravel')->colorize('red', 'blue');
Make the text invisible.
Str::of('Hey Laravel')->conceal();
Swap the foreground with the background and the background with the foreground.
Str::of('Hey Laravel')->colorize('red', 'blue')->reverse();
Make the text underscored.
Str::of('Hey Laravel')->underscore();
Because Laravel Colorize uses Stringable
, all of these methods can be chained together.
Str::of('Hey Laravel')->colorize('red', 'yellow')->bold()->blink();