On Request @HungryTime
STEP 1. Go to: /resources/views/admin/dashboard.blade.php
Find:
<div class="font-size-sm text-uppercase text-muted">Orders</div>
</div>
& Replace with:
<div class="font-size-sm text-uppercase text-muted">Total Orders</div>
</div>TODAY - [ {{ count($displayCompletedSalesToday) }} ]
Again Find:
<div class="font-size-sm text-uppercase text-muted">Users</div>
</div>
& Replace with:
<div class="font-size-sm text-uppercase text-muted">Total Users</div>
</div>TODAY - [ {{ $displayUsersToday }} ]
Again Find:
<div class="font-size-sm text-uppercase text-muted">Stores</div>
</div>
& Replace with:
<div class="font-size-sm text-uppercase text-muted">Total Stores</div>
</div>TODAY - [ {{ $displayRestaurantsToday }} ]
Again Find:
<div class="font-size-sm text-uppercase text-muted">Earnings</div>
</div>
& Replace with:
<div class="font-size-sm text-uppercase text-muted">Total Earnings</div>
</div>TODAY - [ {{ config('appSettings.currencyFormat') }} {{ $displayCompletedSalesToday->sum('total') }} ]
STEP 2. Go To: /app/Http/Controllers/AdminController.php
Find:
public function dashboard(Request $request)
{
After Below this Line,
Paste This:
$displayUsersToday = User::whereDate('created_at', Carbon::now())->get()->count();$displayRestaurantsToday = Restaurant::where('created_at', Carbon::now())->get()->count();
$displaySalesToday = Order::whereDate('created_at', Carbon::now())->get();
$displayCompletedSalesToday = Order::where('orderstatus_id', 5)->whereDate('created_at', Carbon::now())->get();
STEP 3. Go to /app/Http/Controllers/AdminController.php
Find:
'users' => $users,
After Below this Line,
Paste This:
'todaysDate' => $todaysDate,
'orderStatusesName' => $orderStatusesName,
'orderStatusesData' => $orderStatusesData,
'ifAnyOrders' => $ifAnyOrders,
'displayUsersToday' => $displayUsersToday,
'displayRestaurantsToday' => $displayRestaurantsToday,
'displaySalesToday' => $displaySalesToday,
'displayCompletedSalesToday' => $displayCompletedSalesToday,