Laravel 未定义的属性:Sleimanx2\Plastic\PlasticPaginator::$photo\u url(视图)
如何正确地对接收到的数据数组执行foreach 我当前的查询如下: 0ACEF40C7C8195EDB15B2C1970F0A8617DAD5E4.php第9行中出现错误异常: 未定义的属性:Sleimanx2\Plastic\PlasticPaginator:$photo\uURL(视图:C:\xampp\htdocs\elasticsearch\resources\views\presult.blade.php)(视图:C:\xampp\htdocs\elasticsearch\resources\views\presult.blade.php) 在视图中:我使用foreachLaravel 未定义的属性:Sleimanx2\Plastic\PlasticPaginator::$photo\u url(视图),laravel,
elasticsearch,Laravel,
elasticsearch,如何正确地对接收到的数据数组执行foreach 我当前的查询如下: 0ACEF40C7C8195EDB15B2C1970F0A8617DAD5E4.php第9行中出现错误异常: 未定义的属性:Sleimanx2\Plastic\PlasticPaginator:$photo\uURL(视图:C:\xampp\htdocs\elasticsearch\resources\views\presult.blade.php)(视图:C:\xampp\htdocs\elasticsearch\resour
@foreach($books as $Afica)
<article class="one-third">
<figure><a href="#" title=""><img src="{{{ $Afica->photo_url }}}" alt="" style="height: 215px!important;" /></a></figure>
<div class="details">
<h3>{{{ $Afica->name }}}
<span class="stars">
<?php
for ($i=1 ; $i<=$Afica->class ; $i++)
{
echo ' <i class="material-icons"></i>';
}
?>
</span>
</h3>
<span class="address">{{{ $Afica->city_hotel }}},{{{ $Afica->address }}} <a href="">Show on map</a></span>
<span class="rating">{{{ $Afica->preferred }}}</span>
<span class="price">Max rate <em>$ {{{ $Afica->maxrate }}}</em> </span>
<span class="pricee">Min rate <em>$ {{{ $Afica->minrate }}}</em> </span>
<div class="description">
<p>{{{ $Afica->desc_en }}}<a href="hotel?query={{{ $Afica->name }}}">More info</a></p>
</div>
<a href="{{{ $Afica->hotel_url }}}" title="Book now" class="gradient-button">Book now</a>
</div>
</article><?php $myArray[] = $Afica->id;?>
<!--//deal-->
@endforeach
@foreach($Afica)
{{{$Afica->name}}
{{{$Afica->city_hotel}},{{{{{$Afica->address}}
{{{$Afica->首选}}
最大速率${{$Afica->maxrate}}
最小速率${{$Afica->minrate}}
{{{$Afica->desc_en}}
@endforeach
只需将您的范围调整为范围:{“minrate”:{“gte”:0,“lte”:99}我编辑我的答案,请检查并帮助我???
@foreach($books as $Afica)
<article class="one-third">
<figure><a href="#" title=""><img src="{{{ $Afica->photo_url }}}" alt="" style="height: 215px!important;" /></a></figure>
<div class="details">
<h3>{{{ $Afica->name }}}
<span class="stars">
<?php
for ($i=1 ; $i<=$Afica->class ; $i++)
{
echo ' <i class="material-icons"></i>';
}
?>
</span>
</h3>
<span class="address">{{{ $Afica->city_hotel }}},{{{ $Afica->address }}} <a href="">Show on map</a></span>
<span class="rating">{{{ $Afica->preferred }}}</span>
<span class="price">Max rate <em>$ {{{ $Afica->maxrate }}}</em> </span>
<span class="pricee">Min rate <em>$ {{{ $Afica->minrate }}}</em> </span>
<div class="description">
<p>{{{ $Afica->desc_en }}}<a href="hotel?query={{{ $Afica->name }}}">More info</a></p>
</div>
<a href="{{{ $Afica->hotel_url }}}" title="Book now" class="gradient-button">Book now</a>
</div>
</article><?php $myArray[] = $Afica->id;?>
<!--//deal-->
@endforeach