Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Upgrade Laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kuzemchak committed May 3, 2013
1 parent b9192fa commit d57a016
Show file tree
Hide file tree
Showing 14 changed files with 912 additions and 148 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# OS
.DS_Store

# Framework
/bootstrap/compiled.php

# Composer
/vendor
/bootstrap/compiled.php
14 changes: 14 additions & 0 deletions app/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@

'debug' => true,

/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/

'url' => 'http://localhost',

/*
|--------------------------------------------------------------------------
| Application Timezone
Expand Down Expand Up @@ -83,6 +96,7 @@
'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider',
'Illuminate\Log\LogServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Foundation\Providers\MaintenanceServiceProvider',
'Illuminate\Database\MigrationServiceProvider',
'Illuminate\Foundation\Providers\OptimizeServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
Expand Down
2 changes: 2 additions & 0 deletions app/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@

'redis' => array(

'cluster' => true,

'default' => array(
'host' => '127.0.0.1',
'port' => 6379,
Expand Down
6 changes: 3 additions & 3 deletions app/config/session.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default we will use the light-weight cookie driver but
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "cookie", "file", "database", "apc",
| Supported: "native", "cookie", "database", "apc",
| "memcached", "redis", "array"
|
*/
Expand All @@ -36,7 +36,7 @@
| Session File Location
|--------------------------------------------------------------------------
|
| When using the "file" session driver, we need a location where session
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
Expand Down
4 changes: 2 additions & 2 deletions app/config/testing/session.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requets. By default, we will use the light-weight cookie driver but
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "cookie", file", "database", "apc",
| Supported: "native", "cookie", "database", "apc",
| "memcached", "redis", "array"
|
*/
Expand Down
2 changes: 1 addition & 1 deletion app/config/workbench.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
|
| Like the option above, your e-mail address is used when generating new
| workbench packages. The e-mail is placed in your composer.json file
| automatically whwen the package is created by the workbench tool.
| automatically after the package is created by the workbench tool.
|
*/

Expand Down
22 changes: 19 additions & 3 deletions app/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
|--------------------------------------------------------------------------
|
| The following filters are used to verify that the user of the current
| session is logged into this application. Also, a "guest" filter is
| responsible for performing the opposite. Both provide redirects.
| session is logged into this application. The "basic" filter easily
| integrates HTTP Basic authentication for quick, simple checking.
|
*/

Expand All @@ -39,6 +39,22 @@
});


Route::filter('auth.basic', function()
{
return Auth::basic();
});

/*
|--------------------------------------------------------------------------
| Guest Filter
|--------------------------------------------------------------------------
|
| The "guest" filter is the counterpart of the authentication filters as
| it simply checks that the current user is not logged in. A redirect
| response will be issued if they are, which you may freely change.
|
*/

Route::filter('guest', function()
{
if (Auth::check()) return Redirect::to('/');
Expand All @@ -57,7 +73,7 @@

Route::filter('csrf', function()
{
if (Session::getToken() != Input::get('_token'))
if (Session::getToken() != Input::get('csrf_token'))
{
throw new Illuminate\Session\TokenMismatchException;
}
Expand Down
20 changes: 11 additions & 9 deletions app/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
|
*/

"accepted" => ":attribute must be accepted`",
"accepted" => ":attribute must be accepted",
"active_url" => ":attribute is not a valid URL",
"after" => ":attribute must be a date after :date",
"alpha" => ":attribute may only contain letters",
Expand All @@ -37,7 +37,6 @@
"in" => ":attribute is invalid",
"integer" => ":attribute must be an integer",
"ip" => ":attribute must be a valid IP address",
"match" => ":attribute is incorrectly formatted",
"max" => array(
"numeric" => ":attribute must be less than :max",
"file" => ":attribute must be less than :max kilobytes",
Expand All @@ -49,12 +48,15 @@
"file" => ":attribute must be at least :min kilobytes",
"string" => ":attribute must be at least :min characters",
),
"notin" => ":attribute is invalid",
"numeric" => ":attribute must be a number",
"required" => ":attribute is required",
"required_with" => ":attribute is required when :values is present",
"same" => ":attribute and :other must match",
"size" => array(
"not_in" => ":attribute is invalid",
"numeric" => ":attribute must be a number",
"regex" => ":attribute is formatted incorrectly",
"required" => ":attribute is required",
"required_if" => ":attribute is required when :other is :value",
"required_with" => ":attribute is required when :values is present",
"required_without" => ":attribute is required when :values is not present",
"same" => ":attribute and :other must match",
"size" => array(
"numeric" => ":attribute must be :size",
"file" => ":attribute must be :size kilobytes",
"string" => ":attribute must be :size characters",
Expand Down Expand Up @@ -91,4 +93,4 @@
'name' => 'Name',
),

);
);
16 changes: 16 additions & 0 deletions app/start/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@

require __DIR__.'/../errors.php';

/*
|--------------------------------------------------------------------------
| Maintenance Mode Handler
|--------------------------------------------------------------------------
|
| The "down" Artisan command gives you the ability to put an application
| into maintenance mode. Here, you will define what is displayed back
| to the user if maintenace mode is in effect for this application.
|
*/

App::down(function()
{
return Response::make("Be right back!", 503);
});

/*
|--------------------------------------------------------------------------
| Require The Filters File
Expand Down
13 changes: 13 additions & 0 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@
require $compiled;
}

/*
|--------------------------------------------------------------------------
| Setup Patchwork UTF-8 Handling
|--------------------------------------------------------------------------
|
| The Patchwork library provides solid handling of UTF-8 strings as well
| as provides replacements for all mb_* and iconv type functions that
| are not available by default in PHP. We'll setup this stuff here.
|
*/

Patchwork\Utf8\Bootup::initAll();

/*
|--------------------------------------------------------------------------
| Register The Laravel Auto Loader
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
|
*/

$framework = __DIR__.'/../vendor/laravel/framework/src';
$framework = $app['path.base'].'/vendor/laravel/framework/src';

require $framework.'/Illuminate/Foundation/start.php';

Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"scripts": {
"post-update-cmd": "php artisan optimize"
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}
Loading

0 comments on commit d57a016

Please sign in to comment.