1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Pterodactyl - Panel |
4
|
|
|
* Copyright (c) 2015 - 2017 Dane Everitt <[email protected]>. |
5
|
|
|
* |
6
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy |
7
|
|
|
* of this software and associated documentation files (the "Software"), to deal |
8
|
|
|
* in the Software without restriction, including without limitation the rights |
9
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
10
|
|
|
* copies of the Software, and to permit persons to whom the Software is |
11
|
|
|
* furnished to do so, subject to the following conditions: |
12
|
|
|
* |
13
|
|
|
* The above copyright notice and this permission notice shall be included in all |
14
|
|
|
* copies or substantial portions of the Software. |
15
|
|
|
* |
16
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
17
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
18
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
19
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
20
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
21
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
22
|
|
|
* SOFTWARE. |
23
|
|
|
*/ |
24
|
|
|
|
25
|
|
|
namespace Pterodactyl\Http\Controllers\Admin; |
26
|
|
|
|
27
|
|
|
use DB; |
28
|
|
|
use Log; |
29
|
|
|
use Alert; |
30
|
|
|
use Pterodactyl\Models; |
31
|
|
|
use Illuminate\Http\Request; |
32
|
|
|
use Pterodactyl\Exceptions\DisplayException; |
33
|
|
|
use Pterodactyl\Http\Controllers\Controller; |
34
|
|
|
use Pterodactyl\Repositories\ServerRepository; |
35
|
|
|
use Pterodactyl\Repositories\DatabaseRepository; |
36
|
|
|
use Pterodactyl\Exceptions\DisplayValidationException; |
37
|
|
|
|
38
|
|
|
class ServersController extends Controller |
39
|
|
|
{ |
40
|
|
|
/** |
41
|
|
|
* Controller Constructor. |
42
|
|
|
*/ |
43
|
|
|
public function __construct() |
44
|
|
|
{ |
45
|
|
|
// |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function getIndex(Request $request) |
|
|
|
|
49
|
|
|
{ |
50
|
|
|
return view('admin.servers.index', [ |
51
|
|
|
'servers' => Models\Server::withTrashed()->with('node', 'user')->paginate(25), |
|
|
|
|
52
|
|
|
]); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function getNew(Request $request) |
|
|
|
|
56
|
|
|
{ |
57
|
|
|
return view('admin.servers.new', [ |
58
|
|
|
'locations' => Models\Location::all(), |
59
|
|
|
'services' => Models\Service::all(), |
60
|
|
|
]); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function getView(Request $request, $id) |
|
|
|
|
64
|
|
|
{ |
65
|
|
|
|
66
|
|
|
$server = Models\Server::withTrashed()->with( |
|
|
|
|
67
|
|
|
'user', 'option.variables', 'variables', |
68
|
|
|
'node.allocations', 'databases.host' |
69
|
|
|
)->findOrFail($id); |
70
|
|
|
|
71
|
|
|
$server->option->variables->transform(function ($item, $key) use ($server) { |
|
|
|
|
72
|
|
|
$item->server_value = $server->variables->where('variable_id', $item->id)->pluck('variable_value')->first(); |
73
|
|
|
|
74
|
|
|
return $item; |
75
|
|
|
}); |
76
|
|
|
|
77
|
|
|
return view('admin.servers.view', [ |
78
|
|
|
'server' => $server, |
79
|
|
|
'assigned' => $server->node->allocations->where('server_id', $server->id)->sortBy('port')->sortBy('ip'), |
80
|
|
|
'unassigned' => $server->node->allocations->where('server_id', null)->sortBy('port')->sortBy('ip'), |
81
|
|
|
'db_servers' => Models\DatabaseServer::all(), |
82
|
|
|
]); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
public function postNewServer(Request $request) |
86
|
|
|
{ |
87
|
|
|
try { |
88
|
|
|
$server = new ServerRepository; |
89
|
|
|
$response = $server->create($request->only([ |
90
|
|
|
'owner', 'name', 'memory', 'swap', |
91
|
|
|
'node', 'ip', 'port', 'allocation', |
92
|
|
|
'cpu', 'disk', 'service', |
93
|
|
|
'option', 'location', 'pack', |
94
|
|
|
'startup', 'custom_image_name', |
95
|
|
|
'auto_deploy', 'custom_id', |
96
|
|
|
])); |
97
|
|
|
|
98
|
|
|
return redirect()->route('admin.servers.view', ['id' => $response]); |
99
|
|
|
} catch (DisplayValidationException $ex) { |
100
|
|
|
return redirect()->route('admin.servers.new')->withErrors(json_decode($ex->getMessage()))->withInput(); |
101
|
|
|
} catch (DisplayException $ex) { |
102
|
|
|
Alert::danger($ex->getMessage())->flash(); |
103
|
|
|
|
104
|
|
|
return redirect()->route('admin.servers.new')->withInput(); |
105
|
|
|
} catch (\Exception $ex) { |
106
|
|
|
Log::error($ex); |
107
|
|
|
Alert::danger('An unhandled exception occured while attemping to add this server. Please try again.')->flash(); |
108
|
|
|
|
109
|
|
|
return redirect()->route('admin.servers.new')->withInput(); |
110
|
|
|
} |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* Returns a JSON tree of all avaliable nodes in a given location. |
115
|
|
|
* |
116
|
|
|
* @param \Illuminate\Http\Request $request |
117
|
|
|
* @return \Illuminate\Contracts\View\View |
118
|
|
|
*/ |
119
|
|
|
public function postNewServerGetNodes(Request $request) |
120
|
|
|
{ |
121
|
|
|
if (! $request->input('location')) { |
122
|
|
|
return response()->json([ |
123
|
|
|
'error' => 'Missing location in request.', |
124
|
|
|
], 500); |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
return response()->json(Models\Node::select('id', 'name', 'public')->where('location', $request->input('location'))->get()); |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Returns a JSON tree of all avaliable IPs and Ports on a given node. |
132
|
|
|
* |
133
|
|
|
* @param \Illuminate\Http\Request $request |
134
|
|
|
* @return \Illuminate\Contracts\View\View |
135
|
|
|
*/ |
136
|
|
|
public function postNewServerGetIps(Request $request) |
137
|
|
|
{ |
138
|
|
|
if (! $request->input('node')) { |
139
|
|
|
return response()->json([ |
140
|
|
|
'error' => 'Missing node in request.', |
141
|
|
|
], 500); |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
$ips = Models\Allocation::where('node', $request->input('node'))->whereNull('assigned_to')->get(); |
145
|
|
|
$listing = []; |
146
|
|
|
|
147
|
|
|
foreach ($ips as &$ip) { |
148
|
|
|
if (array_key_exists($ip->ip, $listing)) { |
149
|
|
|
$listing[$ip->ip] = array_merge($listing[$ip->ip], [$ip->port]); |
150
|
|
|
} else { |
151
|
|
|
$listing[$ip->ip] = [$ip->port]; |
152
|
|
|
} |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
return response()->json($listing); |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* Returns a JSON tree of all avaliable options for a given service. |
160
|
|
|
* |
161
|
|
|
* @param \Illuminate\Http\Request $request |
162
|
|
|
* @return \Illuminate\Contracts\View\View |
163
|
|
|
*/ |
164
|
|
|
public function postNewServerServiceOptions(Request $request) |
165
|
|
|
{ |
166
|
|
|
if (! $request->input('service')) { |
167
|
|
|
return response()->json([ |
168
|
|
|
'error' => 'Missing service in request.', |
169
|
|
|
], 500); |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
$service = Models\Service::select('executable', 'startup')->where('id', $request->input('service'))->first(); |
|
|
|
|
173
|
|
|
|
174
|
|
|
return response()->json(Models\ServiceOptions::select('id', 'name', 'docker_image')->where('service_id', $request->input('service'))->orderBy('name', 'asc')->get()); |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* Returns a JSON tree of all avaliable variables for a given service option. |
179
|
|
|
* |
180
|
|
|
* @param \Illuminate\Http\Request $request |
181
|
|
|
* @return \Illuminate\Contracts\View\View |
182
|
|
|
*/ |
183
|
|
|
public function postNewServerOptionDetails(Request $request) |
184
|
|
|
{ |
185
|
|
|
if (! $request->input('option')) { |
186
|
|
|
return response()->json([ |
187
|
|
|
'error' => 'Missing option in request.', |
188
|
|
|
], 500); |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
$option = Models\ServiceOptions::with('variables', ['packs' => function ($query) { |
|
|
|
|
192
|
|
|
$query->where('selectable', true); |
193
|
|
|
}])->findOrFail($request->input('option')); |
194
|
|
|
|
195
|
|
|
return response()->json([ |
196
|
|
|
'packs' => $option->packs, |
197
|
|
|
'variables' => $option->variables, |
198
|
|
|
'exec' => $option->display_executable, |
199
|
|
|
'startup' => $option->display_startup, |
200
|
|
|
]); |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
public function postUpdateServerDetails(Request $request, $id) |
204
|
|
|
{ |
205
|
|
|
try { |
206
|
|
|
$server = new ServerRepository; |
207
|
|
|
$server->updateDetails($id, [ |
208
|
|
|
'owner' => $request->input('owner'), |
209
|
|
|
'name' => $request->input('name'), |
210
|
|
|
'reset_token' => ($request->input('reset_token', false) === 'on') ? true : false, |
|
|
|
|
211
|
|
|
]); |
212
|
|
|
|
213
|
|
|
Alert::success('Server details were successfully updated.')->flash(); |
214
|
|
|
} catch (DisplayValidationException $ex) { |
215
|
|
|
return redirect()->route('admin.servers.view', [ |
216
|
|
|
'id' => $id, |
217
|
|
|
'tab' => 'tab_details', |
218
|
|
|
])->withErrors(json_decode($ex->getMessage()))->withInput(); |
219
|
|
|
} catch (DisplayException $ex) { |
220
|
|
|
Alert::danger($ex->getMessage())->flash(); |
221
|
|
|
} catch (\Exception $ex) { |
222
|
|
|
Log::error($ex); |
223
|
|
|
Alert::danger('An unhandled exception occured while attemping to update this server. Please try again.')->flash(); |
224
|
|
|
} |
225
|
|
|
|
226
|
|
|
return redirect()->route('admin.servers.view', [ |
227
|
|
|
'id' => $id, |
228
|
|
|
'tab' => 'tab_details', |
229
|
|
|
])->withInput(); |
230
|
|
|
} |
231
|
|
|
|
232
|
|
|
public function postUpdateContainerDetails(Request $request, $id) |
233
|
|
|
{ |
234
|
|
|
try { |
235
|
|
|
$server = new ServerRepository; |
236
|
|
|
$server->updateContainer($id, ['image' => $request->input('docker_image')]); |
237
|
|
|
Alert::success('Successfully updated this server\'s docker image.')->flash(); |
238
|
|
|
} catch (DisplayValidationException $ex) { |
239
|
|
|
return redirect()->route('admin.servers.view', [ |
240
|
|
|
'id' => $id, |
241
|
|
|
'tab' => 'tab_details', |
242
|
|
|
])->withErrors(json_decode($ex->getMessage()))->withInput(); |
243
|
|
|
} catch (DisplayException $ex) { |
244
|
|
|
Alert::danger($ex->getMessage())->flash(); |
245
|
|
|
} catch (\Exception $ex) { |
246
|
|
|
Log::error($ex); |
247
|
|
|
Alert::danger('An unhandled exception occured while attemping to update this server\'s docker image. Please try again.')->flash(); |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
return redirect()->route('admin.servers.view', [ |
251
|
|
|
'id' => $id, |
252
|
|
|
'tab' => 'tab_details', |
253
|
|
|
]); |
254
|
|
|
} |
255
|
|
|
|
256
|
|
|
public function postUpdateServerToggleBuild(Request $request, $id) |
|
|
|
|
257
|
|
|
{ |
258
|
|
|
$server = Models\Server::with('node')->findOrFail($id); |
|
|
|
|
259
|
|
|
|
260
|
|
|
try { |
261
|
|
|
$res = $server->node->guzzleClient([ |
|
|
|
|
262
|
|
|
'X-Access-Server' => $server->uuid, |
263
|
|
|
'X-Access-Token' => $node->daemonSecret, |
|
|
|
|
264
|
|
|
])->request('POST', '/server/rebuild'); |
265
|
|
|
Alert::success('A rebuild has been queued successfully. It will run the next time this server is booted.')->flash(); |
266
|
|
|
} catch (\GuzzleHttp\Exception\TransferException $ex) { |
267
|
|
|
Log::warning($ex); |
268
|
|
|
Alert::danger('An error occured while attempting to toggle a rebuild.')->flash(); |
269
|
|
|
} |
270
|
|
|
|
271
|
|
|
return redirect()->route('admin.servers.view', [ |
272
|
|
|
'id' => $id, |
273
|
|
|
'tab' => 'tab_manage', |
274
|
|
|
]); |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
public function postUpdateServerUpdateBuild(Request $request, $id) |
278
|
|
|
{ |
279
|
|
|
try { |
280
|
|
|
$server = new ServerRepository; |
281
|
|
|
$server->changeBuild($id, $request->only([ |
282
|
|
|
'default', |
283
|
|
|
'add_additional', |
284
|
|
|
'remove_additional', |
285
|
|
|
'memory', |
286
|
|
|
'swap', |
287
|
|
|
'io', |
288
|
|
|
'cpu', |
289
|
|
|
])); |
290
|
|
|
Alert::success('Server details were successfully updated.')->flash(); |
291
|
|
|
} catch (DisplayValidationException $ex) { |
292
|
|
|
return redirect()->route('admin.servers.view', [ |
293
|
|
|
'id' => $id, |
294
|
|
|
'tab' => 'tab_build', |
295
|
|
|
])->withErrors(json_decode($ex->getMessage()))->withInput(); |
296
|
|
|
} catch (DisplayException $ex) { |
297
|
|
|
Alert::danger($ex->getMessage())->flash(); |
298
|
|
|
|
299
|
|
|
return redirect()->route('admin.servers.view', [ |
300
|
|
|
'id' => $id, |
301
|
|
|
'tab' => 'tab_build', |
302
|
|
|
]); |
303
|
|
|
} catch (\Exception $ex) { |
304
|
|
|
Log::error($ex); |
305
|
|
|
Alert::danger('An unhandled exception occured while attemping to add this server. Please try again.')->flash(); |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
return redirect()->route('admin.servers.view', [ |
309
|
|
|
'id' => $id, |
310
|
|
|
'tab' => 'tab_build', |
311
|
|
|
]); |
312
|
|
|
} |
313
|
|
|
|
314
|
|
View Code Duplication |
public function deleteServer(Request $request, $id, $force = null) |
|
|
|
|
315
|
|
|
{ |
316
|
|
|
try { |
317
|
|
|
$server = new ServerRepository; |
318
|
|
|
$server->deleteServer($id, $force); |
319
|
|
|
Alert::success('Server has been marked for deletion on the system.')->flash(); |
320
|
|
|
|
321
|
|
|
return redirect()->route('admin.servers'); |
322
|
|
|
} catch (DisplayException $ex) { |
323
|
|
|
Alert::danger($ex->getMessage())->flash(); |
324
|
|
|
} catch (\Exception $ex) { |
325
|
|
|
Log::error($ex); |
326
|
|
|
Alert::danger('An unhandled exception occured while attemping to delete this server. Please try again.')->flash(); |
327
|
|
|
} |
328
|
|
|
|
329
|
|
|
return redirect()->route('admin.servers.view', [ |
330
|
|
|
'id' => $id, |
331
|
|
|
'tab' => 'tab_delete', |
332
|
|
|
]); |
333
|
|
|
} |
334
|
|
|
|
335
|
|
View Code Duplication |
public function postToggleInstall(Request $request, $id) |
|
|
|
|
336
|
|
|
{ |
337
|
|
|
try { |
338
|
|
|
$server = new ServerRepository; |
339
|
|
|
$server->toggleInstall($id); |
340
|
|
|
Alert::success('Server status was successfully toggled.')->flash(); |
341
|
|
|
} catch (DisplayException $ex) { |
342
|
|
|
Alert::danger($ex->getMessage())->flash(); |
343
|
|
|
} catch (\Exception $ex) { |
344
|
|
|
Log::error($ex); |
345
|
|
|
Alert::danger('An unhandled exception occured while attemping to toggle this servers status.')->flash(); |
346
|
|
|
} finally { |
347
|
|
|
return redirect()->route('admin.servers.view', [ |
348
|
|
|
'id' => $id, |
349
|
|
|
'tab' => 'tab_manage', |
350
|
|
|
]); |
351
|
|
|
} |
352
|
|
|
} |
353
|
|
|
|
354
|
|
View Code Duplication |
public function postUpdateServerStartup(Request $request, $id) |
|
|
|
|
355
|
|
|
{ |
356
|
|
|
try { |
357
|
|
|
$server = new ServerRepository; |
358
|
|
|
$server->updateStartup($id, $request->except([ |
359
|
|
|
'_token', |
360
|
|
|
]), true); |
361
|
|
|
Alert::success('Server startup variables were successfully updated.')->flash(); |
362
|
|
|
} catch (\Pterodactyl\Exceptions\DisplayException $e) { |
363
|
|
|
Alert::danger($e->getMessage())->flash(); |
364
|
|
|
} catch (\Exception $e) { |
365
|
|
|
Log::error($e); |
366
|
|
|
Alert::danger('An unhandled exception occured while attemping to update startup variables for this server. Please try again.')->flash(); |
367
|
|
|
} finally { |
368
|
|
|
return redirect()->route('admin.servers.view', [ |
369
|
|
|
'id' => $id, |
370
|
|
|
'tab' => 'tab_startup', |
371
|
|
|
])->withInput(); |
372
|
|
|
} |
373
|
|
|
} |
374
|
|
|
|
375
|
|
|
public function postDatabase(Request $request, $id) |
376
|
|
|
{ |
377
|
|
|
try { |
378
|
|
|
$repo = new DatabaseRepository; |
379
|
|
|
$repo->create($id, $request->only([ |
380
|
|
|
'db_server', |
381
|
|
|
'database', |
382
|
|
|
'remote', |
383
|
|
|
])); |
384
|
|
|
Alert::success('Added new database to this server.')->flash(); |
385
|
|
|
} catch (DisplayValidationException $ex) { |
386
|
|
|
return redirect()->route('admin.servers.view', [ |
387
|
|
|
'id' => $id, |
388
|
|
|
'tab' => 'tab_database', |
389
|
|
|
])->withInput()->withErrors(json_decode($ex->getMessage()))->withInput(); |
390
|
|
|
} catch (\Exception $ex) { |
391
|
|
|
Log::error($ex); |
392
|
|
|
Alert::danger('An exception occured while attempting to add a new database for this server.')->flash(); |
393
|
|
|
} |
394
|
|
|
|
395
|
|
|
return redirect()->route('admin.servers.view', [ |
396
|
|
|
'id' => $id, |
397
|
|
|
'tab' => 'tab_database', |
398
|
|
|
])->withInput(); |
399
|
|
|
} |
400
|
|
|
|
401
|
|
View Code Duplication |
public function postSuspendServer(Request $request, $id) |
|
|
|
|
402
|
|
|
{ |
403
|
|
|
try { |
404
|
|
|
$repo = new ServerRepository; |
405
|
|
|
$repo->suspend($id); |
406
|
|
|
Alert::success('Server has been suspended on the system. All running processes have been stopped and will not be startable until it is un-suspended.'); |
407
|
|
|
} catch (DisplayException $e) { |
408
|
|
|
Alert::danger($e->getMessage())->flash(); |
409
|
|
|
} catch (\Exception $e) { |
410
|
|
|
Log::error($e); |
411
|
|
|
Alert::danger('An unhandled exception occured while attemping to suspend this server. Please try again.')->flash(); |
412
|
|
|
} finally { |
413
|
|
|
return redirect()->route('admin.servers.view', [ |
414
|
|
|
'id' => $id, |
415
|
|
|
'tab' => 'tab_manage', |
416
|
|
|
]); |
417
|
|
|
} |
418
|
|
|
} |
419
|
|
|
|
420
|
|
View Code Duplication |
public function postUnsuspendServer(Request $request, $id) |
|
|
|
|
421
|
|
|
{ |
422
|
|
|
try { |
423
|
|
|
$repo = new ServerRepository; |
424
|
|
|
$repo->unsuspend($id); |
425
|
|
|
Alert::success('Server has been unsuspended on the system. Access has been re-enabled.'); |
426
|
|
|
} catch (DisplayException $e) { |
427
|
|
|
Alert::danger($e->getMessage())->flash(); |
428
|
|
|
} catch (\Exception $e) { |
429
|
|
|
Log::error($e); |
430
|
|
|
Alert::danger('An unhandled exception occured while attemping to unsuspend this server. Please try again.')->flash(); |
431
|
|
|
} finally { |
432
|
|
|
return redirect()->route('admin.servers.view', [ |
433
|
|
|
'id' => $id, |
434
|
|
|
'tab' => 'tab_manage', |
435
|
|
|
]); |
436
|
|
|
} |
437
|
|
|
} |
438
|
|
|
|
439
|
|
|
public function postQueuedDeletionHandler(Request $request, $id) |
440
|
|
|
{ |
441
|
|
|
try { |
442
|
|
|
$repo = new ServerRepository; |
443
|
|
|
if (! is_null($request->input('cancel'))) { |
444
|
|
|
$repo->cancelDeletion($id); |
445
|
|
|
Alert::success('Server deletion has been cancelled. This server will remain suspended until you unsuspend it.')->flash(); |
446
|
|
|
|
447
|
|
|
return redirect()->route('admin.servers.view', $id); |
448
|
|
|
} elseif (! is_null($request->input('delete'))) { |
449
|
|
|
$repo->deleteNow($id); |
450
|
|
|
Alert::success('Server was successfully deleted from the system.')->flash(); |
451
|
|
|
|
452
|
|
|
return redirect()->route('admin.servers'); |
453
|
|
|
} elseif (! is_null($request->input('force_delete'))) { |
454
|
|
|
$repo->deleteNow($id, true); |
455
|
|
|
Alert::success('Server was successfully force deleted from the system.')->flash(); |
456
|
|
|
|
457
|
|
|
return redirect()->route('admin.servers'); |
458
|
|
|
} |
459
|
|
|
} catch (DisplayException $ex) { |
460
|
|
|
Alert::danger($ex->getMessage())->flash(); |
461
|
|
|
|
462
|
|
|
return redirect()->route('admin.servers.view', $id); |
463
|
|
|
} catch (\Exception $ex) { |
464
|
|
|
Log::error($ex); |
465
|
|
|
Alert::danger('An unhandled error occured while attempting to perform this action.')->flash(); |
466
|
|
|
|
467
|
|
|
return redirect()->route('admin.servers.view', $id); |
468
|
|
|
} |
469
|
|
|
} |
470
|
|
|
} |
471
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.