Skip to content

open-southeners/laravel-console-file-menu

Repository files navigation

Laravel Console File Menu required php version codecov Edit on VSCode online

Like NunoMaduro's console menu package but for files.

screenshot

Getting started

composer require open-southeners/laravel-console-file-menu

Start using it by copying code from below:

use NunoMaduro\LaravelConsoleMenu\Menu;

// In between your command's code:
$result = $this->fileMenu('/base/path')
    // Customise the underlying menu here: https://github.com/php-school/cli-menu?tab=readme-ov-file#appearance
    ->customise(fn (Menu $menu) => $menu->setForegroundColour('green')
        ->setBackgroundColour('black')
    )
    ->onlyDirectories(false)
    ->hideFileExtensions(false)
    ->respectIgnored(true)
    ->open();

// $result will contain the full file/directory selected path or null otherwise

Partners

skore logo

License

This package is open-sourced software licensed under the MIT license.

About

Like NunoMaduro's console file menu package but for files.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages