Hide total amount of earnings and spendings on dashboard
MODIFY
app/Http/Controllers/DashboardController.php
app/Http/Controllers/DashboardController.php
@@ -58,18 +58,13 @@ class DashboardController extends Controller {
return view('dashboard', [
'currency' => $user->currency,
- 'month' => date('n'),
-
- 'totalEarnings' => $totalEarnings,
- 'totalSpendings' => $totalSpendings,
-
'recentEarnings' => $recentEarnings,
'recentSpendings' => $recentSpendings,
+ 'month' => date('n'),
+ 'totalEarnings' => $totalEarnings,
+ 'totalSpendings' => $totalSpendings,
'mostExpensiveTags' => $mostExpensiveTags,
-
- 'earningsCount' => session('space')->earnings->count(),
- 'spendingsCount' => session('space')->spendings->count()
]);
}
}

MODIFY
resources/views/dashboard.blade.php
resources/views/dashboard.blade.php
<div class="row__column row__column--compact row__column--middle color-dark">{!! $currency !!} {{ $earning->formatted_amount }}</div>
</div>
@endforeach
+ <div class="box__section box__section--header text-right">
+ <a href="/earnings">More <i class="far fa-arrow-right fa-xs"></i></a>
+ </div>
@else
<div class="box__section">You don't have any earnings</div>
@endif
<div class="row__column row__column--compact row__column--middle color-dark">{!! $currency !!} {{ $spending->formatted_amount }}</div>
</div>
@endforeach
+ <div class="box__section box__section--header text-right">
+ <a href="/spendings">More <i class="far fa-arrow-right fa-xs"></i></a>
+ </div>
@else
<div class="box__section">You don't have any spendings</div>
@endif
<div class="box__section">Not enough data</div>
@endif
</div>
- <div class="row row--gutter row--responsive">
- <div class="row__column">
- <div class="box">
- <div class="box__section text-center" style="padding: 15px;">
- <a href="/earnings">{{ __('general.earnings') }} ({{ $earningsCount }}) <i class="fas fa-arrow-right"></i></a>
- </div>
- </div>
- </div>
- <div class="row__column">
- <div class="box">
- <div class="box__section text-center" style="padding: 15px;">
- <a href="/spendings">{{ __('general.spendings') }} ({{ $spendingsCount }}) <i class="fas fa-arrow-right"></i></a>
- </div>
- </div>
- </div>
- </div>
</div>
@endsection

Hide total amount of earnings and spendings on dashboard