PHPackages                             christophrumpel/laravel-command-file-picker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. christophrumpel/laravel-command-file-picker

ActiveLibrary[CLI &amp; Console](/categories/cli)

christophrumpel/laravel-command-file-picker
===========================================

This package lets a user pick a file or class from a list during a Laravel command.

v1.2.0(5y ago)1077.1k↓45.5%22MITPHPPHP ^7.3|^8.0CI failing

Since Jan 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/christophrumpel/laravel-command-file-picker)[ Packagist](https://packagist.org/packages/christophrumpel/laravel-command-file-picker)[ Docs](https://github.com/christophrumpel/laravel-command-file-picker)[ RSS](/packages/christophrumpel-laravel-command-file-picker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (16)Used By (2)

Laravel Command File Picker
===========================

[](#laravel-command-file-picker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/65c11add80b471e46541539ed1301fdda3691aed6115c85f6c93b096e4a0f67f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368726973746f706872756d70656c2f6c61726176656c2d636f6d6d616e642d66696c652d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/christophrumpel/laravel-command-file-picker)[![Build Status](https://camo.githubusercontent.com/fb927d73e40630c94fbe18d612cd8e674fa80d5ad886a47b01a217f96dedd3b0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6368726973746f706872756d70656c2f6c61726176656c2d636f6d6d616e642d66696c652d7069636b65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/christophrumpel/laravel-command-file-picker)[![Quality Score](https://camo.githubusercontent.com/3495087ee5fb7d593adaaa6d7fa362af41524692b7b1f05b5d45c12dde8232e4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6368726973746f706872756d70656c2f6c61726176656c2d636f6d6d616e642d66696c652d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/christophrumpel/laravel-command-file-picker)[![Total Downloads](https://camo.githubusercontent.com/e4924fd38c8df6b0e614b8f32f9dcf71900d228bf5ba98e5793b942f532810cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368726973746f706872756d70656c2f6c61726176656c2d636f6d6d616e642d66696c652d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/christophrumpel/laravel-command-file-picker)

This package lets you show a list of files or classes to choose from during a Laravel command.

[![Screenshot of the command](https://camo.githubusercontent.com/30d91a9b3417a2af352fe05d986e9f718a9c4d2769647fac979c8322e34db6ee/687474703a2f2f73637265656e73686f74732e6e6f6d6f7265656e636f72652e636f6d2f6c61726176656c5f636f6d6d616e645f66696c655f7069636b65725f636c61737365735f76332e706e67)](https://camo.githubusercontent.com/30d91a9b3417a2af352fe05d986e9f718a9c4d2769647fac979c8322e34db6ee/687474703a2f2f73637265656e73686f74732e6e6f6d6f7265656e636f72652e636f6d2f6c61726176656c5f636f6d6d616e645f66696c655f7069636b65725f636c61737365735f76332e706e67)[![Screenshot of the command](https://camo.githubusercontent.com/c1c613174f39e6cbde8f3e4816e871833f9c5d4681d1e7b90da3c0653caeb63f/687474703a2f2f73637265656e73686f74732e6e6f6d6f7265656e636f72652e636f6d2f6c61726176656c5f636f6d6d616e645f66696c655f7069636b65725f6d6f64656c735f76332e706e67)](https://camo.githubusercontent.com/c1c613174f39e6cbde8f3e4816e871833f9c5d4681d1e7b90da3c0653caeb63f/687474703a2f2f73637265656e73686f74732e6e6f6d6f7265656e636f72652e636f6d2f6c61726176656c5f636f6d6d616e645f66696c655f7069636b65725f6d6f64656c735f76332e706e67)[![Screenshot of the command](https://camo.githubusercontent.com/1a13720dbe8a10e8484648efd87139eec8f5e7bcb16c0885b8041f640595a1c5/687474703a2f2f73637265656e73686f74732e6e6f6d6f7265656e636f72652e636f6d2f6c61726176656c5f636f6d6d616e645f66696c655f7069636b65725f66696c65735f76332e706e67)](https://camo.githubusercontent.com/1a13720dbe8a10e8484648efd87139eec8f5e7bcb16c0885b8041f640595a1c5/687474703a2f2f73637265656e73686f74732e6e6f6d6f7265656e636f72652e636f6d2f6c61726176656c5f636f6d6d616e645f66696c655f7069636b65725f66696c65735f76332e706e67)

Reasons You Might Need This Package
-----------------------------------

[](#reasons-you-might-need-this-package)

While using Laravel commands, you may need to run them on specific files or classes. Let's say you want to run some actions on one of your Laravel models. In the past, you may have passed a class or file as an argument to the command. This works, but it is quite cumbersome and leads to typing mistakes.

This package will make it easy for the user by prompting a list of files or classes. (like in the screenshot above) The user can then easily select one, and you can use it inside your command.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require christophrumpel/laravel-command-file-picker
```

Usage
-----

[](#usage)

### Load Classes

[](#load-classes)

To show the user a list of classes, you need to use the package's trait called `PicksClasses`. Just add it to one of your Laravel commands. (Be aware that you have to create your Laravel commands yourself.)

```
