Artisan is part of the base Laravel app, found at https://github.com/laravel/laravel
There's no quick Composer command to retrieve it. You should just download and add it to your project.
Thanks cryode. This is what I was suspecting.
I bet there is a way to do this using bower.
Yup. Looks like there is. http://joshbranchaud.com/blog/2014/02/19/Managing-Single-Files-With-Bower.html
But where to put it? I guess it has to go in a setup script.
I'm pretty limited in how I can make this work the right way. The artisan file doesn't do a whole lot, but even so, I should be able to require it as a component so I can version control it and have it auto-install per each project setup.
Since artisan uses DIR in its formed paths, I can't leave it in a bower_components folder and require it from another PHP file, or symlink to it.
The only good option I can think of is copying it from the bower_components location to the project root as the last step of a setup.sh script, and leave it gitignored. This is what that would look like:
#!/usr/bin/env bash
composer install
npm install
bower install
cp ./bower_components/artisan/index ./artisan
This is the command I used to install artisan using bower:
bower install --save-dev https://raw.githubusercontent.com/laravel/laravel/master/artisan
Which put this in my bower.json file:
"devDependencies": {
"artisan": "https://raw.githubusercontent.com/laravel/laravel/master/artisan"
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community