Data Table With Microunits: {{$author->microunits->count()}}

Add Microunit
@foreach ($author->microunits as $microunit) @endforeach
ID Title Category Status Actions Elements Questions
{{$microunit->id}} {{$microunit->title}} - Created at: {{ date('j M. Y', strtotime($microunit->created_at)) }} {{$microunit->category->name}} @if ($microunit->approved === 0) {!! Form::model($microunit, ['route' => ['admin.mus.activate', $microunit->id], 'method'=>'PUT', 'id'=>'form-activate','style'=>'display:inline-block']) !!} Activate @include('admin.modals.activatemu') {!! Form::close() !!} @elseif ($microunit->approved === 1)
Activated
@endif
{!! Form::open(['route' => ['admin.microunits.destroy', $microunit->id], 'method' => 'DELETE', 'id'=>'form-delete', 'style'=>'display:inline-block']) !!} @include('admin.modals.deletemu') {!! Form::close() !!} @if($microunit->elementmicrounits->count()) {{$microunit->elementmicrounits->count()}} elements @else Add Element @endif @if($microunit->questions->count()) {{$microunit->questions->count()}} Questions @else Add Question @endif
ID Title Category Status Actions Elements Questions