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,7 +208,13 @@ class ServerController extends Controller
|
||||||
public function chooseCompare()
|
public function chooseCompare()
|
||||||
{//NOTICE: Selecting servers is not cached yet
|
{//NOTICE: Selecting servers is not cached yet
|
||||||
$all_servers = Server::where('has_yabs', 1)->get();
|
$all_servers = Server::where('has_yabs', 1)->get();
|
||||||
return view('servers.choose-compare', compact('all_servers'));
|
|
||||||
|
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)
|
public function compareServers($server1, $server2)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user