diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 119c906..a79c4df 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -2,13 +2,23 @@ namespace App\Http\Controllers; +use App\Models\Indicator; +use App\Models\Land; +use App\Models\Rule; +use App\Models\User; use Illuminate\Http\Request; class DashboardController extends Controller { public function admin() { - return view('dashboard.admin'); + $userCount = User::count(); + $landCount = Land::count(); + $indicatorCount = Indicator::whereIn('id', function ($query) { + $query->select('indicator_id')->from('rule'); + })->count(); + $rulesCount = Rule::count(); + return view('dashboard.admin', compact('userCount', 'landCount', 'indicatorCount', 'rulesCount')); } public function petugas() diff --git a/resources/views/dashboard/admin.blade.php b/resources/views/dashboard/admin.blade.php index d15d845..c15666f 100644 --- a/resources/views/dashboard/admin.blade.php +++ b/resources/views/dashboard/admin.blade.php @@ -1,6 +1,13 @@ @extends('layouts.app') @push('title', 'Dashboard Admin') @section('content') + @push('other-css') + + + @endpush +
@@ -22,8 +29,121 @@
+
+
+
+
+
+
+

Jumlah Pengguna

+

0

+
+
+
+ + + +
+
+
+
+
+
+ +
+
+
+
+
+

Jumlah Lahan

+

0

+
+
+
+ + + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+

Jumlah indikator yang digunakan saat ini

+

0

+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+

Jumlah aturan yang telah ditetapkan

+

0

+
+
+
+ + + +
+
+
+
+
+
+
+ +
+
+
+
+

Peta Lahan

+
+
+
+
+
+
+
+
+ + @push('other-js') + + @endpush @endsection diff --git a/resources/views/dashboard/petugas.blade.php b/resources/views/dashboard/petugas.blade.php index 6618b0a..32ba00b 100644 --- a/resources/views/dashboard/petugas.blade.php +++ b/resources/views/dashboard/petugas.blade.php @@ -1,9 +1,14 @@ @extends('layouts.app') @push('title', 'Dashboard Petugas') @section('content') + @push('other-css') + + + @endpush
-
@@ -22,8 +27,76 @@
+
+
+
+
+
+
+

Jumlah Lahan

+

0

+
+
+
+ + + +
+
+
+
+
+
+ +
+
+
+
+
+

Jumlah indikator yang digunakan saat ini

+

0

+
+
+
+ + + +
+
+
+
+
+
+
+
+ +
+
+
+
+

Peta Lahan

+
+
+
+
+
+
+ @push('other-js') + + @endpush @endsection