Skip to content

Instantly share code, notes, and snippets.

@ccschmitz
Created January 28, 2012 17:16
Show Gist options
  • Save ccschmitz/1695080 to your computer and use it in GitHub Desktop.
Save ccschmitz/1695080 to your computer and use it in GitHub Desktop.
Laravel MAMP Setup

Here's how I setup Laravel on MAMP:

1. Add a .htaccess file to the root of the application with the following rules:

<IfModule mod_rewrite.c>
	RewriteEngine on

	RewriteRule ^$ public/ [L]
	RewriteRule (.*) public/$1 [L]
</IfModule>

2. Added the following line somewhere in public/index.php:

if (strpos($_SERVER['HTTP_HOST'], 'localhost') !== false)
{
	$_SERVER['LARAVEL_ENV'] = 'local';
}
else
{
	$_SERVER['LARAVEL_ENV'] = 'production';
}

3. Create the application/config/local directory

4. Create the application/config/local/application.php file and put the following in it:

<?php

return array(

	'url' => 'http://localhost:8888/_app_name_'

);
@scottymeyers
Copy link

This all helped. Also, had to change the following permissions:

chmod -R 777 storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment