@props(['thead','tbody','data','route']) @if ($thead && $tbody)
@foreach ($thead as $key => $th) @endforeach @foreach ($data as $key => $row) @can('haveaccess',$route.'.show') @else @endcan @foreach ($tbody as $key => $td) @endforeach @endforeach
#{{$th}} @if(Route::has($route.'.create') && Gate::check('haveaccess', $route.'.create')) @endif
{{ $row->id }}{{ ($key+1)+(($data->currentPage()-1)*$data->perPage()) }} @if($td == 'status' || $td == 'full_access') @elseif(is_object($row[$td]) && $td != 'created_at' && $td != 'updated_at') @foreach ($row[$td] as $key => $filaobj) {{$filaobj->name}} @endforeach @elseif($td == 'image') @if($row[$td]) {{$row[$td]}} @else @endif @else @php $rowaux = $row; foreach ($arrayrow = explode('.', $td) as $key => $elem) { $rowaux = $rowaux[$elem]; } echo $rowaux; @endphp @endif @if(Route::has($route.'.edit') && Gate::check('haveaccess', $route.'.edit')) @endif @if(Route::has($route.'.destroy') && Gate::check('haveaccess', $route.'.destroy')) @endif
{{$data->withQueryString()->links()}}
@endif