This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run with sudo create_vhost | |
# replace {path to public} eg /var/www/laravel/public | |
# Create the file with VirtualHost configuration in /etc/apache2/site-available/ | |
echo "<VirtualHost *:80> | |
DocumentRoot {path to public} | |
ServerName lawfirmrater.dev | |
<Directory {path to public}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is how we catch the Runtime Exception | |
// file : error.php | |
App::error(function(RuntimeException $exception) | |
{ | |
// Runtime Errors | |
return "Runtime Error : ". $exception->getMessage(); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::error(function(Exception $exception) | |
{ | |
// Server Side Errors. Displays Error Message | |
return 'Server Error : '.$exception->getMessage(); | |
}); | |
App::error(function(RuntimeException $exception) | |
{ | |
// Runtime Errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. | |
| It's a breeze. Simply tell Laravel the URIs it should respond to | |
| and give it the Closure to execute when that URI is requested. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo -e "Configure DocumentRoot to /var/www/public" | |
# Setup hosts file | |
VHOST=$(cat <<EOF | |
<VirtualHost *:80> | |
DocumentRoot "/var/www/public" | |
ServerName lawfirmrater.dev | |
<Directory "/var/www/public"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Configurable variables | |
database='vagrant' | |
username='vagrant' | |
password='vagrant' | |
echo '' | |
echo ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' | |
echo ' Bootstrapping Ubuntu Precise 32bit for Laravel 4' |