feat:implement dashboard for admin side
This commit is contained in:
@@ -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',
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user