关系有更多关于laravel获得双胞胎结果

时间:2020-02-11 04:57:55

标签: php laravel

我尝试显示输入到后置位置中的数据,以显示在每个位置上,如果该数据在那里,则该位置的颜色将为绿色

this is the result

<div class="col-12 pl-0">
    <div class="form-group">
        <label for="location">Location</label>
        <br>
        <div>
            @foreach ($locations as $location)
                @foreach ($postlog->postlocationget as $postlocation)
                        @if($location->id == 1)
                        @else
                        <div style="cursor: pointer;" class="p-2 my-1 badge badge-pill @if($postlocation->location == $location->id) badge-success @else badge-info @endif" id="badgeloc{{$location->id}}">{{$location->location}} </div>
                        <input hidden="hidden" type="checkbox" id="checkloc{{$location->id}}">
                        @endif
                @endforeach                                                         
            @endforeach                                                         
        </div>
    </div>
</div>

0 个答案:

没有答案