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')); } }
/** * 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); } }
/** @test */ public function a_setup_can_return_status() { $setup = new Setup(); $status = $setup->getStatus(); $this->assertInstanceOf('App\\Option', $status); }