Created
August 23, 2014 03:33
-
-
Save kneipp/bc4572da37b66831712f to your computer and use it in GitHub Desktop.
laravel under construction accessed by url or date to launch
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
//em construcao | |
date_default_timezone_set("America/Sao_Paulo"); | |
if (Session::has('access') or (time() > mktime(0, 0, 1, 8, 23, 2014))) { | |
Route::get('/', 'HomeController@index'); | |
} else { | |
Route::get('/', function () { | |
return View::make('underConstruction'); | |
}); | |
} | |
Route::get('/your-url-here', function () { | |
Session::put('access', true); | |
return Redirect::to('/'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment