%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/staging/.trash/vendor.8/laravel/prompts/src/Concerns/
Upload File :
Create Path :
Current File : /home/staging/.trash/vendor.8/laravel/prompts/src/Concerns/Termwind.php

<?php

namespace Laravel\Prompts\Concerns;

use Laravel\Prompts\Output\BufferedConsoleOutput;

use function Termwind\render;
use function Termwind\renderUsing;

trait Termwind
{
    protected function termwind(string $html)
    {
        renderUsing($output = new BufferedConsoleOutput());

        render($html);

        return $this->restoreEscapeSequences($output->fetch());
    }

    protected function restoreEscapeSequences(string $string)
    {
        return preg_replace('/\[(\d+)m/', "\e[".'\1m', $string);
    }
}

Zerion Mini Shell 1.0