Run the artisan command, no matter where you are in the project tree
Open Issues: 1
This package is auto-updated.
Last update: 2023-03-28 02:47:15 UTC
This script will recursively look for the artisan command down the directory tree and execute it for you, no matter where you are in the project tree.
Install globally through composer
composer global require antonioribeiro/artisan-anywhere
Or download the raw file to your /usr/bin and make it executable
sudo wget -q -O /usr/local/bin/artisan \ https://raw.github.com/antonioribeiro/artisan-anywhere/master/artisan sudo chmod 755 /usr/local/bin/artisan
or clone the repo and link it
sudo git clone https://github.com/antonioribeiro/artisan-anywhere.git /etc/laravel-anywhere sudo ln -s /etc/laravel-anywhere/artisan.sh /usr/local/bin/artisan sudo chmod 755 /usr/local/bin/artisan
Once installed, by running artisan from your project directory you should get
$ artisan Artisan found at /Users/antoniocarlosribeiro/code/pragmarx/pragmarx.com/artisan Laravel Framework 5.5.28 Usage: command [options] [arguments] ...
Execute Artisan from anywhere in your Laravel project tree
Let's suppose you went for a walk, far down the Illuminate tree and, being in
$ cd /var/www/laravel/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations
and you need to run tinker, to test some stuff. Well... you have some options:
php ../../../../../../../../artisan tinker php /var/www/laravel artisan tinker cd /var/www/laravel ; php artisan tinker
Pull requests and issues are more than welcome.