feat:implement dashboard for admin side

This commit is contained in:
2026-08-19 13:27:33 +03:30
parent 15368f3c39
commit a4acf20615
3 changed files with 382 additions and 0 deletions
@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Models\Booking;
use App\Models\Comment;
use App\Models\Flight;
use App\Models\Tour;
use App\Models\User;
use Illuminate\Routing\Controller;
use Illuminate\Support\Carbon;
class DashboardController extends Controller
{
public function index()
{
$bookingsCount = Booking::count();
$flightsCount = Flight::count();
$toursCount = Tour::count();
$commentsCount = Comment::count();
$usersCount = User::count();
return view('admin.dashboard', compact(
'bookingsCount',
'flightsCount',
'toursCount',
'commentsCount',
'usersCount',
));
}
}