diff --git a/app/config/app.php b/app/config/app.php index ca18595f..0fcc5c99 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -15,6 +15,19 @@ return array( '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 @@ -47,8 +60,8 @@ return array( |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set - | to a random, long string, otherwise these encrypted values will not - | be safe. Make sure to change it before deploying any application! + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! | */ @@ -77,18 +90,21 @@ return array( 'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', + 'Illuminate\Exception\LiveServiceProvider', 'Illuminate\Filesystem\FilesystemServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Html\HtmlServiceProvider', 'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider', 'Illuminate\Log\LogServiceProvider', 'Illuminate\Mail\MailServiceProvider', + 'Illuminate\Foundation\Providers\MaintenanceServiceProvider', 'Illuminate\Database\MigrationServiceProvider', 'Illuminate\Foundation\Providers\OptimizeServiceProvider', 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Foundation\Providers\PublisherServiceProvider', 'Illuminate\Queue\QueueServiceProvider', 'Illuminate\Redis\RedisServiceProvider', + 'Illuminate\Remote\RemoteServiceProvider', 'Illuminate\Auth\Reminders\ReminderServiceProvider', 'Illuminate\Foundation\Providers\RouteListServiceProvider', 'Illuminate\Database\SeedServiceProvider', @@ -135,7 +151,7 @@ return array( 'Cache' => 'Illuminate\Support\Facades\Cache', 'ClassLoader' => 'Illuminate\Support\ClassLoader', 'Config' => 'Illuminate\Support\Facades\Config', - 'Controller' => 'Illuminate\Routing\Controllers\Controller', + 'Controller' => 'Illuminate\Routing\Controller', 'Cookie' => 'Illuminate\Support\Facades\Cookie', 'Crypt' => 'Illuminate\Support\Facades\Crypt', 'DB' => 'Illuminate\Support\Facades\DB', @@ -144,7 +160,7 @@ return array( 'File' => 'Illuminate\Support\Facades\File', 'Form' => 'Illuminate\Support\Facades\Form', 'Hash' => 'Illuminate\Support\Facades\Hash', - 'Html' => 'Illuminate\Support\Facades\Html', + 'HTML' => 'Illuminate\Support\Facades\HTML', 'Input' => 'Illuminate\Support\Facades\Input', 'Lang' => 'Illuminate\Support\Facades\Lang', 'Log' => 'Illuminate\Support\Facades\Log', @@ -160,6 +176,7 @@ return array( 'Schema' => 'Illuminate\Support\Facades\Schema', 'Seeder' => 'Illuminate\Database\Seeder', 'Session' => 'Illuminate\Support\Facades\Session', + 'SSH' => 'Illuminate\Support\Facades\SSH', 'Str' => 'Illuminate\Support\Str', 'URL' => 'Illuminate\Support\Facades\URL', 'Validator' => 'Illuminate\Support\Facades\Validator', diff --git a/app/config/auth.php b/app/config/auth.php index 62ea9c3d..38eb282b 100644 --- a/app/config/auth.php +++ b/app/config/auth.php @@ -52,11 +52,19 @@ return array( | that should be used as your password reminder e-mail. You will also | be able to set the name of the table that holds the reset tokens. | + | The "expire" time is the number of minutes that the reminder should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | */ 'reminder' => array( - 'email' => 'emails.auth.reminder', 'table' => 'password_reminders', + 'email' => 'emails.auth.reminder', + + 'table' => 'password_reminders', + + 'expire' => 60, ), diff --git a/app/config/database.php b/app/config/database.php index c154f767..f479bf40 100644 --- a/app/config/database.php +++ b/app/config/database.php @@ -111,6 +111,8 @@ return array( 'redis' => array( + 'cluster' => true, + 'default' => array( 'host' => '127.0.0.1', 'port' => 6379, diff --git a/app/config/mail.php b/app/config/mail.php index 7b7dff67..a7151a06 100644 --- a/app/config/mail.php +++ b/app/config/mail.php @@ -11,7 +11,7 @@ return array( | sending of e-mail. You may specify which one you're using throughout | your application here. By default, Laravel is setup for SMTP mail. | - | Supported: "smtp", "mail" + | Supported: "smtp", "mail", "sendmail" | */ @@ -95,4 +95,30 @@ return array( 'password' => null, -); + /* + |-------------------------------------------------------------------------- + | Sendmail System Path + |-------------------------------------------------------------------------- + | + | When using the "sendmail" driver to send e-mails, we will need to know + | the path to where Sendmail lives on this server. A default path has + | been provided here, which will work well on most of your systems. + | + */ + + 'sendmail' => '/usr/sbin/sendmail -bs', + + /* + |-------------------------------------------------------------------------- + | Mail "Pretend" + |-------------------------------------------------------------------------- + | + | When this option is enabled, e-mail will not actually be sent over the + | web and will instead be written to your application's logs files so + | you may inspect the message. This is great for local development. + | + */ + + 'pretend' => false, + +); \ No newline at end of file diff --git a/app/config/remote.php b/app/config/remote.php new file mode 100644 index 00000000..29296f3b --- /dev/null +++ b/app/config/remote.php @@ -0,0 +1,57 @@ + 'production', + + /* + |-------------------------------------------------------------------------- + | Remote Server Connections + |-------------------------------------------------------------------------- + | + | These are the servers that will be accessible via the SSH task runner + | facilities of Laravel. This feature radically simplifies executing + | tasks on your servers, such as deploying out these applications. + | + */ + + 'connections' => array( + + 'production' => array( + 'host' => '', + 'username' => '', + 'password' => '', + 'key' => '', + ), + + ), + + /* + |-------------------------------------------------------------------------- + | Remote Server Groups + |-------------------------------------------------------------------------- + | + | Here you may list connections under a single group name, which allows + | you to easily access all of the servers at once using a short name + | that is extremely easy to remember, such as "web" or "database". + | + */ + + 'groups' => array( + + 'web' => array('production') + + ), + +); \ No newline at end of file diff --git a/app/config/session.php b/app/config/session.php index c4a3a093..549d3ff3 100644 --- a/app/config/session.php +++ b/app/config/session.php @@ -8,15 +8,15 @@ return array( |-------------------------------------------------------------------------- | | 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" | */ - 'driver' => 'cookie', + 'driver' => 'native', /* |-------------------------------------------------------------------------- @@ -24,7 +24,7 @@ return array( |-------------------------------------------------------------------------- | | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle for it is expired. If you want them + | to be allowed to remain idle before it expires. If you want them | to immediately expire when the browser closes, set it to zero. | */ @@ -36,7 +36,7 @@ return array( | 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. | @@ -122,17 +122,4 @@ return array( 'domain' => null, - /* - |-------------------------------------------------------------------------- - | Session Payload Cookie Name - |-------------------------------------------------------------------------- - | - | When using the "cookie" session driver, you may configure the name of - | the cookie used as the session "payload". This cookie actually has - | the encrypted session data stored within it for the application. - | - */ - - 'payload' => 'laravel_payload', - ); diff --git a/app/config/testing/session.php b/app/config/testing/session.php index 338aebaf..a18c1b9f 100644 --- a/app/config/testing/session.php +++ b/app/config/testing/session.php @@ -8,10 +8,10 @@ return array( |-------------------------------------------------------------------------- | | 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" | */ diff --git a/app/config/workbench.php b/app/config/workbench.php index 623cd192..56bee526 100644 --- a/app/config/workbench.php +++ b/app/config/workbench.php @@ -22,7 +22,7 @@ return array( | | 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. | */ diff --git a/app/filters.php b/app/filters.php index 2276b4e2..85f82c41 100644 --- a/app/filters.php +++ b/app/filters.php @@ -28,17 +28,33 @@ App::after(function($request, $response) |-------------------------------------------------------------------------- | | 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. | */ Route::filter('auth', function() { - if (Auth::guest()) return Redirect::route('login'); + if (Auth::guest()) return Redirect::guest('login'); }); +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('/'); @@ -57,7 +73,7 @@ Route::filter('guest', function() Route::filter('csrf', function() { - if (Session::getToken() != Input::get('_token')) + if (Session::token() != Input::get('_token')) { throw new Illuminate\Session\TokenMismatchException; } diff --git a/app/lang/en/validation.php b/app/lang/en/validation.php index a6107907..5a24a40c 100644 --- a/app/lang/en/validation.php +++ b/app/lang/en/validation.php @@ -13,54 +13,61 @@ return array( | */ - "accepted" => "The :attribute must be accepted.", - "active_url" => "The :attribute is not a valid URL.", - "after" => "The :attribute must be a date after :date.", - "alpha" => "The :attribute may only contain letters.", - "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", - "alpha_num" => "The :attribute may only contain letters and numbers.", - "before" => "The :attribute must be a date before :date.", - "between" => array( + "accepted" => "The :attribute must be accepted.", + "active_url" => "The :attribute is not a valid URL.", + "after" => "The :attribute must be a date after :date.", + "alpha" => "The :attribute may only contain letters.", + "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", + "alpha_num" => "The :attribute may only contain letters and numbers.", + "array" => "The :attribute must be an array.", + "before" => "The :attribute must be a date before :date.", + "between" => array( "numeric" => "The :attribute must be between :min - :max.", "file" => "The :attribute must be between :min - :max kilobytes.", "string" => "The :attribute must be between :min - :max characters.", + "array" => "The :attribute must have between :min - :max items.", ), - "confirmed" => "The :attribute confirmation does not match.", - "date" => "The :attribute is not a valid date.", - "date_format" => "The :attribute does not match the format :format.", - "different" => "The :attribute and :other must be different.", - "digits" => "The :attribute must be :digits digits.", - "digits_between" => "The :attribute must be between :min and :max digits.", - "email" => "The :attribute format is invalid.", - "exists" => "The selected :attribute is invalid.", - "image" => "The :attribute must be an image.", - "in" => "The selected :attribute is invalid.", - "integer" => "The :attribute must be an integer.", - "ip" => "The :attribute must be a valid IP address.", - "max" => array( - "numeric" => "The :attribute may not be greater than :max.", - "file" => "The :attribute may not be greater than :max kilobytes.", - "string" => "The :attribute may not be greater than :max characters.", + "confirmed" => "The :attribute confirmation does not match.", + "date" => "The :attribute is not a valid date.", + "date_format" => "The :attribute does not match the format :format.", + "different" => "The :attribute and :other must be different.", + "digits" => "The :attribute must be :digits digits.", + "digits_between" => "The :attribute must be between :min and :max digits.", + "email" => "The :attribute format is invalid.", + "exists" => "The selected :attribute is invalid.", + "image" => "The :attribute must be an image.", + "in" => "The selected :attribute is invalid.", + "integer" => "The :attribute must be an integer.", + "ip" => "The :attribute must be a valid IP address.", + "max" => array( + "numeric" => "The :attribute may not be greater than :max.", + "file" => "The :attribute may not be greater than :max kilobytes.", + "string" => "The :attribute may not be greater than :max characters.", + "array" => "The :attribute may not have more than :max items.", ), - "mimes" => "The :attribute must be a file of type: :values.", - "min" => array( - "numeric" => "The :attribute must be at least :min.", - "file" => "The :attribute must be at least :min kilobytes.", - "string" => "The :attribute must be at least :min characters.", + "mimes" => "The :attribute must be a file of type: :values.", + "min" => array( + "numeric" => "The :attribute must be at least :min.", + "file" => "The :attribute must be at least :min kilobytes.", + "string" => "The :attribute must be at least :min characters.", + "array" => "The :attribute must have at least :min items.", ), "not_in" => "The selected :attribute is invalid.", - "numeric" => "The :attribute must be a number.", - "regex" => "The :attribute format is invalid.", - "required" => "The :attribute field is required.", - "required_with" => "The :attribute field is required when :values is present.", - "same" => "The :attribute and :other must match.", - "size" => array( - "numeric" => "The :attribute must be :size.", - "file" => "The :attribute must be :size kilobytes.", - "string" => "The :attribute must be :size characters.", + "numeric" => "The :attribute must be a number.", + "regex" => "The :attribute format is invalid.", + "required" => "The :attribute field is required.", + "required_if" => "The :attribute field is required when :other is :value.", + "required_with" => "The :attribute field is required when :values is present.", + "required_without" => "The :attribute field is required when :values is not present.", + "same" => "The :attribute and :other must match.", + "size" => array( + "numeric" => "The :attribute must be :size.", + "file" => "The :attribute must be :size kilobytes.", + "string" => "The :attribute must be :size characters.", + "array" => "The :attribute must contain :size items.", ), - "unique" => "The :attribute has already been taken.", - "url" => "The :attribute format is invalid.", + "unique" => "The :attribute has already been taken.", + "url" => "The :attribute format is invalid.", /* |-------------------------------------------------------------------------- diff --git a/app/start/global.php b/app/start/global.php index f85b9bae..7697a6be 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -53,6 +53,22 @@ App::error(function(Exception $exception, $code) Log::error($exception); }); +/* +|-------------------------------------------------------------------------- +| 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 @@ -64,4 +80,4 @@ App::error(function(Exception $exception, $code) | */ -require __DIR__.'/../filters.php'; \ No newline at end of file +require app_path().'/filters.php'; \ No newline at end of file diff --git a/app/start/local.php b/app/start/local.php index adab104c..78ddffeb 100644 --- a/app/start/local.php +++ b/app/start/local.php @@ -1,3 +1,14 @@ client->request('GET', '/'); $this->assertTrue($this->client->getResponse()->isOk()); - - $this->assertCount(1, $crawler->filter('h1:contains("Hello World!")')); } } \ No newline at end of file diff --git a/app/views/hello.php b/app/views/hello.php index ba7c290e..065a0a8a 100644 --- a/app/views/hello.php +++ b/app/views/hello.php @@ -1 +1,52 @@ -