muath-ic / artisan-command-alias
Define aliases for Laravel Artisan commands
dev-master
2020-01-01 10:18 UTC
Requires
- php: ^7.1
- illuminate/console: 5.6.*
- illuminate/support: 5.6.*
Requires (Dev)
- orchestra/testbench: ^3.6
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2025-05-29 01:44:25 UTC
README
This package allows you to create some aliases for Artisan purpose. It's like bash
, but for Artisan.
Installation
You can install the package via composer:
composer require muath-ic/artisan-command-alias
Usage
First, you need to publish the configuration file which storing all your availabled aliases with
php artisan vendor:publish --provider="muath-ic\CommandAlias\ArtisanCommandAliasServiceProvider"
Now, edit config/artisan-command-alias.php
and creates yours like
<?php /* * Configuration file for CommandAlias package */ return [ /* * Register all your alias in the next array. You can use string association * if there's no argument. * * https://laravel.com/docs/5.6/artisan#programmatically-executing-commands */ 'commands' => [ 'i' => 'inspire', 'lsr' => ['route:list', ['--reverse' => true]], ] ];
You may create a bash
alias for Artisan like alias a="php artisan"
and execute command like a i
or a lsr
as git
(alias g="git"
; g lga
).
License
The MIT License (MIT). Please see License File for more information.