@props(['primaryrowid','primarymoduleid','secondarymoduleid']) @php use App\Models\Demography; use App\Models\DGModel; use App\Models\User; try { $Demography=new Demography; $DGModel=new DGModel; $PprimaryKeyName=$Demography->getPrimaryKeyName($primarymoduleid); $source="CreateViewQuickCreate"; $headers=$DGModel->GetQuickCreateFields($secondarymoduleid,$source); $fieldsList=[]; foreach($headers as $header) { $fieldsList['LabelValue']=$header['ColumnName']; } $fieldsList['CreatedDate']='CreatedDate'; $fieldsList['CreatedBy']='CreatedBy'; $SmainTableName=$Demography->getMainTableName($secondarymoduleid); $SCstmTableName=$Demography->GetCustomTableName($secondarymoduleid); $SprimaryKeyName=$Demography->getPrimaryKeyName($secondarymoduleid); $ScstmprimaryKeyName=$Demography->getCstmPrimaryKeyName($secondarymoduleid); $results=DB::table($SmainTableName) ->join($SCstmTableName,$SmainTableName.".".$SprimaryKeyName,'=',$SCstmTableName.".".$ScstmprimaryKeyName) ->where($PprimaryKeyName,$primaryrowid)->where('DeletedStatus',0)->orderby('CreatedDate','desc')->take(5)->get($fieldsList); } catch(\Exception $e) { $results=[]; } @endphp @if(count($results))
| {{$value}} | @endforeach||
|---|---|---|
| {{$username}} | @elseif($value=="CreatedDate"){{date('d-m-y h:i:s A',strtotime($res->$value))}} | @else{{$res->$value}} | @endif @endforeach