Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PHP Artisan AliasNew to Visual Studio Code? Get it now.
PHP Artisan Alias

PHP Artisan Alias

M B Parvez

|
836 installs
| (1) | Free
Zero-config shortcuts for Laravel Artisan commands (e.g., 'a' for 'php artisan', 'serve', 'mkmodel'). Supports Sail automatically.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP Artisan Alias

VS Code extension for Laravel developers - Set custom aliases for php artisan commands.

New in version 0.14:

  • Zero Config: Works immediately. No manual setup required.
  • Works Everywhere: Run commands from any sub-directory.
  • Custom Aliases: Add your own shortcuts in settings.
  • Terminal Help: Type a -h to see your command list styled like Artisan.

Quick Start

  1. Install from VS Code Marketplace.
  2. Open a Laravel project in VS Code.
  3. Open a terminal (`Ctrl+ ``).
  4. Done! Type a or a -h to see if it works.

View Shortcuts

There are two easy ways to see all available commands: using the terminal or a visual panel.

✨ Shortcuts in Terminal

Type this to see the complete, colored list of commands (Standard + Custom):

a -h
# or
a --help

✨ Shortcuts in Visual Panel

Prefer a visual list? Open the HTML help page:

  • Press Ctrl+Shift+P
  • Type "Laravel: Show Shortcuts Help"

Available Aliases

Here is a list of the most common aliases included out-of-the-box. Note that this list is not exhaustive—check the help menu for everything.

Main Alias

By default, a is the shortcut for php artisan.

a list             # php artisan list
a make:model User  # php artisan make:model User

Direct Commands

Common commands work directly without any prefix.

serve              # php artisan serve
migrate            # php artisan migrate
tinker             # php artisan tinker
test               # php artisan test
up / down          # php artisan up / down
optimize           # php artisan optimize

Make Commands → mk[name]

mkmodel User       # php artisan make:model User
mkcontroller User  # php artisan make:controller User
mkview welcome     # php artisan make:view welcome
mkmigration users  # php artisan make:migration users
mktest UserTest    # php artisan make:test UserTest
mkrequest StoreReq # php artisan make:request StoreReq
mkresource UserRes # php artisan make:resource UserResource
# ... supports all standard make: commands

Database & Migration

fresh              # php artisan migrate:fresh
rollback           # php artisan migrate:rollback
status             # php artisan migrate:status
reset              # php artisan migrate:reset
dbseed             # php artisan db:seed
dbwipe             # php artisan db:wipe

Utility Shortcuts

routs              # php artisan route:list
keygen             # php artisan key:generate
link               # php artisan storage:link
unlink             # php artisan storage:unlink
cache-clear        # php artisan cache:clear
config-clear       # php artisan config:clear
queue-work         # php artisan queue:work
schedule-run       # php artisan schedule:run

Patterns to Remember

To make these aliases easy to memorize, we follow a few simple naming conventions.

Make Commands → mk[name]

Rule: Add mk prefix to any make: name

php artisan make:model User      → mkmodel User
php artisan make:controller User → mkcontroller User

Database Commands → db[name]

Rule: Add db prefix to any db: name

php artisan db:seed    → dbseed
php artisan db:wipe    → dbwipe

Common Commands → Just the command name

Rule: Remove php artisan prefix completely

php artisan migrate → migrate
php artisan serve   → serve
php artisan test    → test

Migration Commands → Action name only

Rule: Remove php artisan migrate: prefix

php artisan migrate:fresh   → fresh
php artisan migrate:rollback → rollback

Quick Shortcuts → Intuitive abbreviations

Rule: Use logical shortcuts for specific commands

php artisan route:list     → routs (route + s)
php artisan key:generate   → keygen (key + gen)

Configuration

You can customize everything in your VS Code settings.json.

1. Change the Main Alias Don't like a? Change it to art or laravel.

"phpArtisanAlias.alias": "art"

2. Add Custom Shortcuts Create your own aliases for any command. These will appear when you type a -h.

"phpArtisanAlias.custom": {
    "pest": "./vendor/bin/pest",
    "fresh-seed": "php artisan migrate:fresh --seed"
}

3. Change "Serve" Shortcut Default is Ctrl+Alt+S.

"phpArtisanAlias.serveShortcut": "ctrl+alt+s"

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Developer: M B Parvez | Support: TheUI | License: MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft