Exemplo n.º 1
0
 public function postToggleInstall(Request $request, $id)
 {
     try {
         $server = new ServerRepository();
         $server->toggleInstall($id);
         Alert::success('Server status was successfully toggled.')->flash();
     } catch (DisplayException $ex) {
         Alert::danger($ex->getMessage())->flash();
     } catch (\Exception $ex) {
         Log::error($ex);
         Alert::danger('An unhandled exception occured while attemping to toggle this servers status.')->flash();
     } finally {
         return redirect()->route('admin.servers.view', ['id' => $id, 'tab' => 'tab_manage']);
     }
 }