Answer the question
In order to leave comments, you need to log in
Offline website, how to make Laravel 4?
Hello. I'm building a website and ran into a problem. It is necessary to make it so that the site is disabled page appears if the configs indicate that the site is disabled.
Tried to put in "app\start\global.php" the "Engine:siteOffline();" model, but the error page didn't show up.
Model code:
public static function siteOnline(){
/**
* Включён ли сайт
*/
$online = Config::get('config.engine.online');
if($online['online'] == false){
// Если сайт выключен
return View::make('errors.offline')->with('offline', $online);
}
}
Answer the question
In order to leave comments, you need to log in
There is also a standard mechanism .
If you want to run the command programmatically and not through the terminal, the documentation describes in detail how to do this (documentation for 5.1, but also works in the 4th version).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question