Skip to content

Instantly share code, notes, and snippets.

@kneipp
Created August 23, 2014 03:33
Show Gist options
  • Save kneipp/bc4572da37b66831712f to your computer and use it in GitHub Desktop.
Save kneipp/bc4572da37b66831712f to your computer and use it in GitHub Desktop.
laravel under construction accessed by url or date to launch
//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