PHP code example of kielabokkie / laravel-fancy-console

1. Go to this page and download the library: Download kielabokkie/laravel-fancy-console library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kielabokkie / laravel-fancy-console example snippets




namespace App\Console\Commands;

use Illuminate\Console\Command;
use Kielabokkie\FancyConsole\Traits\FancyConsole;

class MyCommand extends Command
{
    use FancyConsole;
}

$this->success('Yes, it worked!');
$this->success('Yes, it worked!', 'OK');

$this->fail('Oh no, it did not work.');
$this->fail('Oh no, it did not work.', 'BUMMER');

$this->successBlock('This is a great success');

$this->errorBlock('This is a serious error');

for ($i = 0; $i < 100; $i++) {
    $this->dot();
}

$this->setDotWidth(40);

for ($i = 0; $i < 100; $i++) {
    $this->dot();
}

$dotTotal = 100;

$this->setDotTotal($dotTotal);
$this->setDotWidth(40);

for ($i = 0; $i < $dotTotal; $i++) {
    $this->dot();
}

$this->dot('-');