@extends('main') @section('content')
| User/Organisation Name | Registration or Authorised | Contact Details | Date of Registration | Address | @foreach($craftType as $value){{$value->name}} | @endforeach|
|---|---|---|---|---|---|---|
| {{$i}} | {{$value->name}} | {{$value->gis_no}} | {{$value->mobile}} | {{\Carbon\Carbon::parse($value->created_at)->format('d-m-Y')}} | @if($value->district != "") {{$value->district}} @endif @if($value->area != "") {{$value->area}} @endif {{$value->pincode}} | @php $userCarpet = \App\Carpet::select(DB::raw('COUNT(*) as total'),'type','idUser')->where('idUser', $value->id)->groupBy('type')->get()->pluck('total', 'type')->toArray(); @endphp @foreach($craftType as $value)@if(array_key_exists($value->name,$userCarpet)) {{$userCarpet[$value->name]}} @endif | @endforeach