/** * Shows the update screen * * @param string $method * @param string $action * @return \Illuminate\Support\Facades\View */ public function getUpdate($method = 'web', $action = '') { // Updater stage $stage = Session::has('setup.stage') ? Session::get('setup.stage') : 1; // Output based on request method switch ($method) { case 'web': $data = array('error' => Session::get('messages.error'), 'success' => Session::get('messages.success'), 'version' => Session::get('setup.version'), 'versions' => Setup::updateVersions(), 'messages' => Setup::messages(), 'unstable' => System::updated() > 0); return View::make("setup/update/stage{$stage}", $data); case 'ajax': return Setup::update($action); case 'error': return View::make('setup/error'); default: App::abort(404); // Not found } }