Wednesday, April 12, 2017

laravel blade rendering for p tag [duplicate]

This question already has an answer here:

In the development of the use of laravel to do, encountered a problem that had not encountered a strange, I would like to cycle in a p tag inside some Div. Similar effects are as follows:

<p>
  @foreach($list as $val)
  <div></div>
  @endforeach
</p>
//it's supposed to be like this
<p>
  <div>1</div>
  <div>1</div>
  <div>1</div>
  <div>1</div>
</p>

However, I can not achieve the desired effect, my code and results are as follows:

<p>
@foreach($val['userList'] as $v)
<div class="km-member clearfloat m_bottom" data-user_id="">
  <div class="km-member-pic">
    <i class="km-member-bg"></i>
    <img src="" alt="" class="km-member-img">
  </div>
  <span></span>
  <i class="km-icon-delete"></i>
</div>
@endforeach
</p>

In the browser has become this way:

enter image description here



via nate

Advertisement