Friday, June 28, 2013

Installing Laravel With MAMP on OSX

You're going to need to install mcrypt. Here's a link with instructions:

From there, follow the instructions for install from the Laravel website:

You're going to end up with over 100 megabytes of framework files and dependencies, with 80 mb of that being the doctrine and symfony folders. Don't say anything about it or you'll get brow beaten.

You're going to have troubles connecting to mysql. Choose a solution that works for you.

Create your local db connection file:

$ mkdir app/config/local
$ cp app/config/database.php app/config/local/database.php

Edit your local database config with the proper credentials for MAMP (localhost, laravel, root, root).

Edit bootstrap/start.php with your development domain name or localhost so that it uses the local config.

The default MAMP mysql username is "root" with a password of "root". You might want to change that:

Set up migrations:
$ php artisan migrate --env=local

The local flag is important because php doesn't know where you're running it from from the command line.

Set up a user table:

If you want to just read the docs they're here:

You can start into the tutorials. These are for Laravel 3.x but figuring out the differences between 3.x and 4.x might be a fun passtime! Exercise your brain a little (migrations has moved to database migrations, underscores have been replaced with camelCase, all very sensible changes):

You'll need to run "composer.phar update" in order to rollback migrations. ???

Setup your user table for the sparkling new admin you're going to create:

Make php 5.3 the default from the command line:

If you're using dreamhost, you'll need to install laravel from the command line using composer.

You will get error message relating to phar:

You will get a memory issue running composer:
/usr/local/php53/bin/php -d memory_limit=256M composer.phar create-project laravel/laravel --prefer-dist

You'll have a missing files issue related to the vendor directory:

And then sync up things with git for Dreamhost if you're using dreamhost:

You will have errors returned in terminal when running composer.phar related to executing artisan. These issues don't seem to be critical, and are related to composer.phar executing php using the default php route instead of /usr/local/php53/bin/php.

1 comment:

Blogger said...

Bluehost is definitely one of the best hosting provider with plans for any hosting needs.