Browse Source

Added proper code for new maintenance mode feature.

Taylor Otwell 11 years ago
parent
commit
74cd3eb838
2 changed files with 17 additions and 0 deletions
  1. 1 0
      app/config/app.php
  2. 16 0
      app/start/global.php

+ 1 - 0
app/config/app.php

@@ -96,6 +96,7 @@ return array(
 		'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider',
 		'Illuminate\Log\LogServiceProvider',
 		'Illuminate\Mail\MailServiceProvider',
+		'Illuminate\Foundation\Providers\MaintenanceServiceProvider',
 		'Illuminate\Database\MigrationServiceProvider',
 		'Illuminate\Foundation\Providers\OptimizeServiceProvider',
 		'Illuminate\Pagination\PaginationServiceProvider',

+ 16 - 0
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 "We'll be right back!";
+});
+
 /*
 |--------------------------------------------------------------------------
 | Require The Filters File