@if(\Auth::user()->hasPosts($year))
@foreach($categories as $category) @foreach($category->posts as $post) @endforeach @endforeach
  Jan Feb Mar Apr May Jun Jul Aug Sep Okt Nov Dec Avg Total
{{$category->name}}                            
  {{$post->name}}
{!! $hf->number($post->monthValue(1)) !!}
{!! $hf->number($post->monthValue(2)) !!}
{!! $hf->number($post->monthValue(3)) !!}
{!! $hf->number($post->monthValue(4)) !!}
{!! $hf->number($post->monthValue(5)) !!}
{!! $hf->number($post->monthValue(6)) !!}
{!! $hf->number($post->monthValue(7)) !!}
{!! $hf->number($post->monthValue(8)) !!}
{!! $hf->number($post->monthValue(9)) !!}
{!! $hf->number($post->monthValue(10)) !!}
{!! $hf->number($post->monthValue(11)) !!}
{!! $hf->number($post->monthValue(12)) !!}
{!! $hf->number($post->avgValue($activeMonthCount)) !!} {!! $hf->number($post->totalValue()) !!}
  {!! $hf->number($category->monthValue($year, 1)) !!} {!! $hf->number($category->monthValue($year, 2)) !!} {!! $hf->number($category->monthValue($year, 3)) !!} {!! $hf->number($category->monthValue($year, 4)) !!} {!! $hf->number($category->monthValue($year, 5)) !!} {!! $hf->number($category->monthValue($year, 6)) !!} {!! $hf->number($category->monthValue($year, 7)) !!} {!! $hf->number($category->monthValue($year, 8)) !!} {!! $hf->number($category->monthValue($year, 9)) !!} {!! $hf->number($category->monthValue($year, 10)) !!} {!! $hf->number($category->monthValue($year, 11)) !!} {!! $hf->number($category->monthValue($year, 12)) !!} {!! $hf->number($category->avgValue($year, $activeMonthCount)) !!} {!! $hf->number($category->totalValue($year)) !!}
                             
Total {!! $hf->number(\Auth::user()->monthValue($categories, $year, 1)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 2)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 3)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 4)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 5)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 6)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 7)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 8)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 9)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 10)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 11)) !!} {!! $hf->number(\Auth::user()->monthValue($categories, $year, 12)) !!} {!! $hf->number(\Auth::user()->avgValue($categories, $year, $activeMonthCount)) !!} {!! $hf->number(\Auth::user()->totalValue($categories, $year)) !!}
@elseif(count($yearList) > 0)

or copy from:

@endif