Skip to content

๐Ÿ”˜ Beautiful PHP CLI menus. Is a php-school/cli-menu wrapper for Laravel/Artisan Console Commands

License

Notifications You must be signed in to change notification settings

lex111/laravel-console-menu

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

StyleCI Status Latest Stable Version License

About Laravel Console Menu

Laravel Console Menu was created by, and is maintained by Nuno Maduro, and is a php-school/cli-menu wrapper for Laravel Console Commands.

Installation

Requires PHP 7.0+

Require Laravel Console Menu using Composer:

composer require nunomaduro/laravel-console-menu

Usage

Quick Setup

class MenuCommand extends Command
{
    /**
     * Execute the console command.
     *
     * @return void
     */
    public function handle()
    {
        $option = $this->menu('Pizza menu', [
            'Freshly baked muffins',
            'Freshly baked croissants',
            'Turnovers, crumb cake, cinnamon buns, scones',
        ])->open();

        $this->info("You have chosen the option number #$option");
    }
}

Appearance

Available colors: black, red, green, yellow, blue, magenta, cyan, white.

  $this->menu($title, $options)
      ->setForegroundColour('green')
      ->setBackgroundColour('black')
      ->setWidth(200)
      ->setPadding(10)
      ->setMargin(5)
      ->setExitButtonText("Abort") // remove exit button with ->disableDefaultItems()
      ->setUnselectedMarker('โ…')
      ->setSelectedMarker('โœ')
      ->setTitleSeparator('*-')
      ->addLineBreak('<3', 2)
      ->addStaticItem('AREA 2')
      ->open();

Check out the full documentation here.

Contributing

Thank you for considering to contribute to Laravel Console Menu. All the contribution guidelines are mentioned here.

You can have a look at the CHANGELOG for constant updates & detailed information about the changes. You can also follow the twitter account for latest announcements or just come say hi!: @enunomaduro

Support the development

Do you like this project? Support it by donating

License

Laravel Console Menu is an open-sourced software licensed under the MIT license.

About

๐Ÿ”˜ Beautiful PHP CLI menus. Is a php-school/cli-menu wrapper for Laravel/Artisan Console Commands

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%