counts on the dashboard

This commit is contained in:
2025-04-08 17:54:33 +01:00
parent 57b35b4849
commit a7386814c7
4 changed files with 65 additions and 14 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
use App\Models\Organisation;
use App\Models\Provider;
use Illuminate\Http\Request;
use Inertia\Inertia;
@@ -12,6 +13,7 @@ class OrganisationController extends Controller
{
return inertia('organisations/Show', [
'providers' => Inertia::lazy(fn () => Provider::whereOrganisationId($request->route('organisation'))->get()),
'organisation' => Organisation::withCount('servers', 'applications', 'members')->findOrFail($request->route('organisation')),
]);
}
}