Skip to content

A small workaround to use the beatiful CLI interface of Laravel Prompts without importing functions.

Notifications You must be signed in to change notification settings

TarsisioXavier/laravel-sprompt

Repository files navigation

Sprompt stands for Simple Prompt

It's a small class to be used as a facade for accessing the Laravel Prompts' functions so you don't need to import every function in your PHP file to use them.

Installation

Install it using composer like:

composer require tarsisio-xavier/sprompt

Usage

<?php

use TarsisioXavier\Sprompt\Sprompt;

require __DIR__ . '/../vendor/autoload.php';

$name = Sprompt::text('What is your name?');

// Input the name... e.g. Maeve Millay

Sprompt::info("You said that your name is {$name}");

// Output: You said that your name is Maeve Millay

About

A small workaround to use the beatiful CLI interface of Laravel Prompts without importing functions.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published