Only show the export button in the dashboard when more than one entry exists for the given model

This commit is contained in:
Kevin MacMartin 2018-01-21 19:48:30 -05:00
parent f489d3724f
commit 5c2ad8cccb
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
@extends('dashboard.core')
@section('dashboard-heading')
@if($export)
@if($export && count($rows) > 0)
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a>
@endif

View file

@ -1,7 +1,9 @@
@extends('dashboard.core')
@section('dashboard-heading')
@if(count($rows) > 0)
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a>
@endif
@endsection
@section('dashboard-body')