mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-15 12:53:44 +02:00
Cleanup database query code.
This commit is contained in:
@@ -48,10 +48,7 @@ class DatabaseController extends Controller
|
||||
{
|
||||
return view('admin.databases.index', [
|
||||
'databases' => Models\Database::with('server')->paginate(50),
|
||||
'hosts' => Models\DatabaseServer::select(
|
||||
'database_servers.*',
|
||||
DB::raw('(SELECT COUNT(*) FROM `databases` WHERE `databases`.`db_server` = database_servers.id) as c_databases')
|
||||
)->with('node')->paginate(20),
|
||||
'hosts' => Models\DatabaseServer::withCount('databases')->with('node')->paginate(20),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user