<div class="row" id="getsum">
<?php $i=0;$j=0;
$sum=Session::get('sumofac');
// dd($sum);
echo 'sum= '.$sum;
foreach(@$vehicles as $vehicle_details) {$i++; if($vehicle_details->is_airport_trips == 1 && $vehicle_details->is_private_airport==1 ) {
echo ' inside private ';
?>
<div class=" col-sm-12 col-md-12 col-lg-3 @if($vehicle_details->is_shared_airport) shared_airport_yes @endif
@if($vehicle_details->is_private_airport) <?php $j++;?> private_airport_yes @endif">
<div class="shared_airport_box vehicles shared_vehicles text-center @if($vehicle_details->is_shared_airport) shared_airport_yes @endif @if($vehicle_details->is_private_airport) <?php $j++;?> private_airport_yes @endif" style="min-height: 400px;">
<div class="options__container--option <?= ($i==1 || $j==1 && $vehicle_details->is_private_airport==1)?'checked11':'';?> " >
<input id="chb1_{{$vehicle_details->id}}" type="radio" value="{{$vehicle_details->id}}" name="vehicle_id" data-value="{{$vehicle_details->minimum_hr}} !! {{$vehicle_details->psngr_price_1}} !! {{$vehicle_details->vehicle_name}}" class="shared_airport_box_label <?= ($i==1 || $vehicle_details->is_private_airport==1)?'autochecked':'';?>" >
<label for="chb1_{{$vehicle_details->id}}" class="shared_airport_box_label">
<img src="{{ url('core/public/public/Image/'.$vehicle_details->image) }}">
<h4 class="options__container--title"> {{@$vehicle_details->vehicle_name}}</h4><p> {{ @$vehicle_details->description}}</p>
<p><span style="font-weight: bold;" id="shared_price_{{$vehicle_details->id}}"> </span></p>
</label>
</div>
</div>
</div>
<?php }
} ?> </div> <!-- getsumdivends -->
这是我的div,其中存储了来自控制器的会话,当我刷新页面时,我只需要$sum=Session::get('sumofac');为了不改变整个div和**,我需要在if case中使用$sum,例如:if($vehicle_details->maxpassengers >= $sum)然后显示下面div的其余部分。**
提前感谢!!!
1条答案
按热度按时间bz4sfanl1#