Updated the server choose compare method
Updated the server choose compare method If 2 suitable servers aren't found then throw an error alert
This commit is contained in:
parent
4b3e72bc93
commit
dcb8a78ff8
|
@ -208,9 +208,15 @@ class ServerController extends Controller
|
|||
public function chooseCompare()
|
||||
{//NOTICE: Selecting servers is not cached yet
|
||||
$all_servers = Server::where('has_yabs', 1)->get();
|
||||
|
||||
if (isset($all_servers[1])){
|
||||
return view('servers.choose-compare', compact('all_servers'));
|
||||
}
|
||||
|
||||
return redirect()->route('servers.index')
|
||||
->with('error', 'You need atleast 2 servers with a YABS to do a compare');
|
||||
}
|
||||
|
||||
public function compareServers($server1, $server2)
|
||||
{
|
||||
$server1_data = Server::server($server1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user