示例#1
0
 public function dashboard()
 {
     if (Setup::getStatus()->value == "firstopen") {
         $info = "You are visiting your dashboard for the first time. Let's configure your website the way you want it.";
         return View::make('admin.settings', compact('options', 'info'));
     } else {
         return View::make('admin.dashboard', compact('options'));
     }
 }
示例#2
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $setup = Setup::getStatus()->value;
     if ($setup == "firstopen" || $setup == "running") {
         abort(404);
     } else {
         return $next($request);
     }
 }
示例#3
0
 /** @test */
 public function a_setup_can_return_status()
 {
     $setup = new Setup();
     $status = $setup->getStatus();
     $this->assertInstanceOf('App\\Option', $status);
 }