@foreach($asset_details as $key => $asset_detail)
@php $check_favourite_asset=''; if(auth()->user()) { $check_favourite_asset= \App\Models\FavouriteAsset::where('asset_id',$asset_detail->id)->where('customer_id',auth()->user()->id)->where('status','1')->count(); } @endphp @if($check_favourite_asset == 1) @elseif($check_favourite_asset == 0) @else @endif
@php $count_favourite_asset= \App\Models\FavouriteAsset::where('asset_id',$asset_detail->id)->where('status','1')->count(); @endphp

ID:{{ $asset_detail->asset_id }}

@for ($starcount=0 ; $starcount<5; $starcount++) @if($starcount<=$asset_detail->starrating) @else @endif @endfor (15)
@php $userdetails=\App\Models\User::select('name')->where('id', $asset_detail->userid)->first(); @endphp
{{ $userdetails->name }}
@php echo $money = \App\Http\Controllers\AssetDetailsController::displayassetprice($asset_detail->id); @endphp