Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antonioribeiro/artisan-anywhere
Execute Artisan from anywhere in your Laravel project tree
https://github.com/antonioribeiro/artisan-anywhere
artisan bash laravel linux shell
Last synced: 20 days ago
JSON representation
Execute Artisan from anywhere in your Laravel project tree
- Host: GitHub
- URL: https://github.com/antonioribeiro/artisan-anywhere
- Owner: antonioribeiro
- License: mit
- Created: 2013-10-11T21:46:22.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-02-28T07:57:01.000Z (over 5 years ago)
- Last Synced: 2024-04-24T21:01:56.613Z (7 months ago)
- Topics: artisan, bash, laravel, linux, shell
- Size: 11.7 KB
- Stars: 43
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Laravel Artisan Anywhere
========================### TLDR;
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.
## Installation
Install globally through composer
```bash
composer global require antonioribeiro/artisan-anywhere
```Or download the raw file to your /usr/bin and make it executable
```bash
sudo wget -q -O /usr/local/bin/artisan \
https://raw.github.com/antonioribeiro/artisan-anywhere/master/artisansudo chmod 755 /usr/local/bin/artisan
```or clone the repo and link it
```bash
sudo git clone https://github.com/antonioribeiro/artisan-anywhere.git /etc/laravel-anywheresudo ln -s /etc/laravel-anywhere/artisan.sh /usr/local/bin/artisan
sudo chmod 755 /usr/local/bin/artisan
```## Usage
Once installed, by running artisan from your project directory you should get
``` bash
$ artisan
Artisan found at /Users/antoniocarlosribeiro/code/pragmarx/pragmarx.com/artisan
Laravel Framework 5.5.28Usage:
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:
```bash
php ../../../../../../../../artisan tinkerphp /var/www/laravel artisan tinker
cd /var/www/laravel ; php artisan tinker
```or just
```bash
artisan tinker
```## Credits
- [Antonio Carlos Ribeiro](https://github.com/antonioribeiro)
- [Matija Kovačević](https://github.com/matijakovacevic)
- [All Contributors](../../contributors)#### Contributing
Pull requests and issues are more than welcome.