Good Evening.. I am self leaner and doing project for home. I am trying to show the info-box based on nos of Society name and show each society name in the same. I able to get the Nos of info-box but stuck how to get Name for each info-box.
Here is my blade file.
<div >
@foreach ($getsocietyname as $item)
<div >
<div style="width: 18rem;">
<div >
<strong>Get Society Name </strong>
</div>
<ul >
<li >Total Customer</li>
<li >Active Customer</li>
</ul>
</div>
</div>
@endforeach
</div>
Controller File
$getsocietyname = DB::table('Customer')->select(DB::raw('society'))->groupBy('society')->get(); // get society name
$getallcustomerdatafortable = Customer::
select(
DB::raw('status,society')
)
->where('status','=','active')->get();
Ref. Images
CodePudding user response:
Confusing but maybe this simple ....
<strong>{{ $item['society'] }}</strong>