2017-25 © Pedro Peláez
 

library artisan-shortcuts

Register shortcuts for executing artisan commands.

image

sven/artisan-shortcuts

Register shortcuts for executing artisan commands.

  • Tuesday, July 24, 2018
  • by svenluijten
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

artisan-shortcuts, (*1)

Laravel Artisan Shortcuts

Latest Version on Packagist Total Downloads ![Software License][ico-license] ![Build Status][ico-tests] StyleCI, (*2)

Have you ever executed 2 or 3 artisan commands over, and over, and over in your Laravel projects? Me too! That's what prompted this package. With it, you can define "shortcuts" to bundle up those commonly used commands into short, memorable names (or long, convoluted ones, that's up to you!)., (*3)

Installation

You'll have to follow a couple of simple steps to install this package., (*4)

Downloading

Via composer:, (*5)

$ composer require sven/artisan-shortcuts

Or add the package to your dependencies in composer.json and run composer update on the command line to download the package:, (*6)

{
    "require": {
        "sven/artisan-shortcuts": "^1.0"
    }
}

Registering the service provider

If you're not using auto-discovery, register Sven\ArtisanShortcuts\ServiceProvider::class in your config/app.php file., (*7)

Publishing the configuration file

To publish this package's configuration file, execute the following command and pick Sven\ArtisanShortcuts\ServiceProvider from the list:, (*8)

$ php artisan vendor:publish

Usage

After publishing the configuration file, you can define your shortcuts in config/shortcuts.php. Knowing that, creating your own artisan shortcuts is fairly straightforward. Take a look at the following configuration:, (*9)

return [
    'custom-command' => [
        FirstCommand::class => [
            '--option' => 'value',
        ],
        SecondCommand::class,
    ],
];

Running php artisan custom-command will execute FirstCommand with the option --option=value, and SecondCommand without any arguments or options., (*10)

Something I use this for all the time is Barry van den Heuvel's laravel-ide-helper commands:, (*11)

return [
    'ide' => [
        GeneratorCommand::class,
        ModelsCommand::class => ['--nowrite' => true],
        MetaCommand::class,
    ],
];

Instead of using the FQCN for the command classes, you can also use the command names:, (*12)

return [
    'clear' => [
        'cache:clear',
        'config:clear',
        'view:clear',
    ],
];

Supported versions

Look at the table below to find out what versions of Laravel are supported on what version of this package:, (*13)

Laravel Artisan Shortcuts
5.5 - 8.x ^1.0

Contributing

All contributions (pull requests, issues and feature requests) are welcome. Make sure to read through the CONTRIBUTING.md first, though. See the contributors page for all contributors., (*14)

License

sven/artisan-shortcuts is licensed under the MIT License (MIT). Please see the license file for more information., (*15)

The Versions

24/07 2018

dev-master

9999999-dev

Register shortcuts for executing artisan commands.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel php shortcuts commands cli artisan laravel-artisan shorthands

07/07 2018

v1.0.0-beta3

1.0.0.0-beta3

Register shortcuts for executing artisan commands.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel php shortcuts commands cli artisan laravel-artisan shorthands

07/07 2018

v1.0.0-beta2

1.0.0.0-beta2

Register shortcuts for executing artisan commands.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel php shortcuts commands cli artisan laravel-artisan shorthands

29/06 2018

v1.0.0-beta1

1.0.0.0-beta1

Register shortcuts for executing artisan commands.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel php shortcuts commands cli artisan laravel-artisan shorthands