Run artisan from anywhere in with Laravel artisan plugin for zsh
Laravel artisan plugin for zsh is a new package which helps you to run artisan from anywhere in the project tree, with auto-completion!
First, download the plugin to your oh-my-zsh custom plugin location:
git clone https://github.com/jessarcher/zsh-artisan.git ~/.oh-my-zsh/custom/plugins/artisan
Then enable the plugin in your .zshrc file:
plugins=( artisan composer git )
Note that you will need to re-source your .zshrc or restart zsh to pick up the plugin changes.
Simply use the command artisan from anywhere within the directory structure of a Laravel project and it will search up the tree for the artisan command and execute it. E.g:
$ pwd ~/MyProject/tests/Feature $ artisan make:model MyAwesomeModel Model created successfully.
This post is submitted by one of our members. You may submit a new post here.