diff options
Diffstat (limited to 'oh-my-zsh/plugins/laravel')
-rw-r--r-- | oh-my-zsh/plugins/laravel/README.md | 57 | ||||
-rw-r--r-- | oh-my-zsh/plugins/laravel/_artisan | 40 | ||||
-rw-r--r-- | oh-my-zsh/plugins/laravel/laravel.plugin.zsh | 41 |
3 files changed, 138 insertions, 0 deletions
diff --git a/oh-my-zsh/plugins/laravel/README.md b/oh-my-zsh/plugins/laravel/README.md new file mode 100644 index 0000000..95f5901 --- /dev/null +++ b/oh-my-zsh/plugins/laravel/README.md @@ -0,0 +1,57 @@ +# Laravel + +This plugin adds aliases and autocompletion for Laravel [Artisan](https://laravel.com/docs/artisan) and [Bob](http://daylerees.github.io/laravel-bob/) command-line interfaces. + +``` +plugins=(... laravel) +``` + +| Alias | Description | +|:-:|:-:| +| `artisan` | `php artisan` | +| `pas` | `php artisan serve` | + +## Database + +| Alias | Description | +|:-:|:-:| +| `pam` | `php artisan migrate` | +| `pamf` | `php artisan migrate:fresh` | +| `pamfs` | `php artisan migrate:fresh --seed` | +| `pamr` | `php artisan migrate:rollback` | +| `pads` | `php artisan db:seed` | + +## Makers + +| Alias | Description | +|:-:|:-:| +| `pamm` | `php artisan make:model` | +| `pamc` | `php artisan make:controller` | +| `pams` | `php artisan make:seeder` | +| `pamt` | `php artisan make:test` | +| `pamfa` | `php artisan make:factory` | +| `pamp` | `php artisan make:policy` | +| `pame` | `php artisan make:event` | +| `pamj` | `php artisan make:job` | +| `paml` | `php artisan make:listener` | +| `pamn` | `php artisan make:notification` | + +## Clears + +| Alias | Description | +|:-:|:-:| +| `pacac` | `php artisan cache:clear` | +| `pacoc` | `php artisan config:clear` | +| `pavic` | `php artisan view:clear` | +| `paroc` | `php artisan route:clear` | + +## Queues + +| Alias | Description | +|:-:|:-:| +| `paqf` | `php artisan queue:failed` | +| `paqft` | `php artisan queue:failed-table` | +| `paql` | `php artisan queue:listen` | +| `paqr` | `php artisan queue:retry` | +| `paqt` | `php artisan queue:table` | +| `paqw` | `php artisan queue:work` | diff --git a/oh-my-zsh/plugins/laravel/_artisan b/oh-my-zsh/plugins/laravel/_artisan new file mode 100644 index 0000000..8637514 --- /dev/null +++ b/oh-my-zsh/plugins/laravel/_artisan @@ -0,0 +1,40 @@ +#compdef artisan + +# Laravel autocompletion +# Author: John Hamelink <john@johnhamelink.com> +# +# This plugin does the following: +# - Adds aliases and autocompletion for artisan +# - Adds aliases and autocompletion for bob + +local curcontext="$curcontext" state line _opts _bundles ret=1 +_arguments -C \ + '1: :->cmds' \ + '*:: :->args' && ret=0 + +case $state in + cmds) + + _values "Artisan command" \ + 'session\:install[Create a session table]' \ + 'migrate[Manage Migrations]' \ + 'test[Run a test]' \ + 'route\:\:call[Call a route in the CLI]' \ + 'key\:\:generate[Generate a key]' + ret=0 + ;; + args) + case $line[1] in + migrate) + _values \ + 'install[Create the Laravel migration table' \ + 'make[Create a migration]' \ + 'rollback[Roll back to the last migration operation]' \ + 'reset[Roll back all migrations that have ever run]' + ret=0 + ;; + esac + ;; +esac + +return ret diff --git a/oh-my-zsh/plugins/laravel/laravel.plugin.zsh b/oh-my-zsh/plugins/laravel/laravel.plugin.zsh new file mode 100644 index 0000000..a8382d3 --- /dev/null +++ b/oh-my-zsh/plugins/laravel/laravel.plugin.zsh @@ -0,0 +1,41 @@ +#!zsh +alias artisan='php artisan' +alias bob='php artisan bob::build' + +# Development +alias pas='php artisan serve' + +# Database +alias pam='php artisan migrate' +alias pamf='php artisan migrate:fresh' +alias pamfs='php artisan migrate:fresh --seed' +alias pamr='php artisan migrate:rollback' +alias pads='php artisan db:seed' + +# Makers +alias pamm='php artisan make:model' +alias pamc='php artisan make:controller' +alias pams='php artisan make:seeder' +alias pamt='php artisan make:test' +alias pamfa='php artisan make:factory' +alias pamp='php artisan make:policy' +alias pame='php artisan make:event' +alias pamj='php artisan make:job' +alias paml='php artisan make:listener' +alias pamn='php artisan make:notification' +alias pampp='php artisan make:provider' + + +# Clears +alias pacac='php artisan cache:clear' +alias pacoc='php artisan config:clear' +alias pavic='php artisan view:clear' +alias paroc='php artisan route:clear' + +# queues +alias paqf='php artisan queue:failed' +alias paqft='php artisan queue:failed-table' +alias paql='php artisan queue:listen' +alias paqr='php artisan queue:retry' +alias paqt='php artisan queue:table' +alias paqw='php artisan queue:work' |