mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-14 12:23:44 +02:00
Add toggle install status support
This commit is contained in:
@@ -312,4 +312,21 @@ class ServersController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function postToggleInstall(Request $request, $id)
|
||||
{
|
||||
try {
|
||||
$server = new ServerRepository;
|
||||
$server->toggleInstall($id);
|
||||
Alert::success('Server status was successfully toggled.')->flash();
|
||||
} catch(\Exception $e) {
|
||||
Log::error($e);
|
||||
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'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user