Categories
Laravel

Laravel Installation

The intro docs have you using Composer to pull in all its dependencies, which come to about 100mb. Apparently it should be possible to turn off development bundles, but not sure I’ve done it yet.

This composer.json:

{
	"require": {
		"laravel/framework": "4.0.*"
	},
	"autoload": {
		"classmap": [
			"app/commands",
			"app/controllers",
			"app/models",
			"app/database/migrations",
			"app/database/seeds",
			"app/tests/TestCase.php"
		]
	},
	"scripts": {
		"pre-update-cmd": [
			"php artisan clear-compiled"
		],
		"post-install-cmd": [
			"php artisan optimize"
		],
		"post-update-cmd": [
			"php artisan vendor-cleanup",
			"php artisan optimize"
		]
	},
	"config": {
		"preferred-install": "dist"
	},
	"minimum-stability": "dev"
}

Should cut file size down with the vendor-cleanup, but I’m wondering if the artisan command does nothing on my local system. When did it get into Windows?

Code Bright takes a different approach, pulling from GitHub. Haven’t tried it yet though.

4 replies on “Laravel Installation”

I may be able to shed some light on your issues. If you’re on Windows, are you using WAMP?

When using WAMP, I’m not sure if PHP is available globally (most likely not) which means that Artisan would certainly fail to do anything. One approach in resolving this is installing PHP on your system, globally, outside of WAMP/XAMPP or whatever else.

There’s a neat package manager called Chocolatey and it allows you to install PHP and other tools, fully accessible from cmd (which is what you want) with ease. Give that a shot! 🙂

I manually installed Apache2.4, PHP 5.4.15 and MySQL. I’m a bit of a control freak about where those things go and have never used WAMP.

PHP is in my environment path and I can call it anywhere, but I’m pretty sure artisan is not installed. I’ll look into Chocolately.

Thanks again Antonin.

Thanks yes, I eventually realized artisan was a script in Laravel’s directory. I think I was confused by comments on the internet that PHP needed to be in the system PATH so it could be called from anywhere. I misunderstood that to mean artisan could be called from anywhere.

PHP has always been in my PATH so no probs there and now I get that artisan commands have to be run from the correct dir.

Presumably Composer runs PHP in the Laravel directory to make use of those scripts in the JSON above?

Leave a Reply

Your email address will not be published. Required fields are marked *