php - laravel foreach broke column -


sorry title couldn't think better title!

anyway, blog page code:

@extends('layouts.frontend_index')  @section('title', 'blog')  @section('content')    <div class="container">      <div class="row" style="margin-bottom:30px;">       <div class="col-md-8">         <div class="row">           @forelse($posts $post)           <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12" style="margin-bottom:15px;">             <div class="card card2">               <div class="cardimg">                 <a href="{{ route('frontshow', $post->slug ) }}"><img src="{{ url('images/') }}/{{ $post->image }}" class="card-img-top" style="width:100%; height:auto; max-height:500px;" alt="{{ $post->title }}"></a>               </div>               <div class="card-block">                 <h4 class="card-title"><a href="{{ route('frontshow', $post->slug ) }}">{{$post->title}}</a></h4>                 <p class="card-text">{!!  str_limit($post->body, 10) !!}</p>                 <p><a class="btn btn-block btn-link" href="{{ route('frontshow', $post->slug ) }}">read more <i class="fa fa-arrow-right"></i></a></p>               </div>             </div>           </div>           @empty             <p>no post available yet!</p>             <div class="text-center">               <a class="btn btn-error" href="{{url('/')}}">back main page</a>             </div>           @endforelse            <div class="col-md-12 text-center">             {{$posts->links()}}           </div>         </div><!--end row-->       </div><!--end col-md-8-->        <div class="col-md-4">         <h3>get latest updates...</h3>         <a target="_blank" href="https://t.me/studiotjd"><div id="telegram"></div></a>         <a target="_blank" href="https://www.facebook.com/studiotjd"><div id="facebook"></div></a>         <a target="_blank" href="https://www.instagram.com/studiotjd/"><div id="instagram"></div></a>       </div><!--end col-md-4-->     </div><!--end row-->      <div class="row">       <div class="col-md-12">         <div class="row">           <div class="col-md-4 span3 wow rollin" style="animation-delay: 1s;"><a href="{{route('categories.lists')}}"><div id="library"></div></a></div><!--end col-md-4-->           <div class="col-md-4 span3 wow bounceindown center" style="animation-delay: 1s;"><a href="{{route('shop')}}"><div id="library2"></div></a></div><!--end col-md-4-->           <div class="col-md-4 span3 wow bounceinright" style="animation-delay: 1s;"><a href="{{route('courses')}}"><div id="library3"></div></a></div><!--end col-md-4-->         </div><!--end row-->       </div><!--end col-md-12-->     </div><!--end row-->  </div>  @endsection 

here how looks in view: view

i tried fix issue nothing works! can see in inspect col-md-4 goes under first col-md-4 , don't know why

inspect

is there knows how fix issue?

try

{{ strip_tags(str_limit($post->body, 10)) }}  

i think have html element stored in database, , using str_limit tags in body not closed.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -