mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-11-11 03:01:51 -05:00
Aliases always ran `php artisan`, so users of Laravel Herd (`herd php`) or a versioned binary (`php8.4`) couldn't use them. The new `zstyle ':omz:plugins:laravel' php` setting replaces `php` in every alias; without it the aliases are unchanged.
83 lines
2.3 KiB
Markdown
83 lines
2.3 KiB
Markdown
# 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)
|
|
```
|
|
|
|
## Settings
|
|
|
|
By default the aliases run `php artisan`. To use a different PHP command, such as
|
|
`herd php` (which runs the PHP version the [Laravel Herd](https://herd.laravel.com) site
|
|
is isolated to, instead of Herd's global version) or a specific version like `php8.4`,
|
|
set this before Oh My Zsh is sourced:
|
|
|
|
```zsh
|
|
zstyle ':omz:plugins:laravel' php 'herd php'
|
|
```
|
|
|
|
`php` in the aliases below is then replaced with that command.
|
|
|
|
## Aliases
|
|
|
|
| Alias | Description |
|
|
|:-:|:-:|
|
|
| `artisan` | `php artisan` |
|
|
| `pas` | `php artisan serve` |
|
|
| `pad` | `php artisan dev` |
|
|
| `pats` | `php artisan test` |
|
|
|
|
## 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` |
|
|
| `padw` | `php artisan db:wipe` |
|
|
|
|
## 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` |
|
|
| `pamcl` | `php artisan make:class` |
|
|
| `pamen` | `php artisan make:enum` |
|
|
| `pami` | `php artisan make:interface` |
|
|
| `pamtr` | `php artisan make:trait` |
|
|
| `pamv` | `php artisan make:view` |
|
|
| `pammig` | `php artisan make:migration` |
|
|
|
|
## Clears
|
|
|
|
| Alias | Description |
|
|
|:-:|:-:|
|
|
| `pacac` | `php artisan cache:clear` |
|
|
| `pacoc` | `php artisan config:clear` |
|
|
| `pavic` | `php artisan view:clear` |
|
|
| `paroc` | `php artisan route:clear` |
|
|
| `paopc` | `php artisan optimize: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` |
|