Current File : /home/tradevaly/demo.tradevaly.com.bd/resources/views/frontend/news.blade.php
@extends('layouts.frontend')
    @section('content') 
    
  <div id="wrapper-content" class="wrapper-content pb-0 pt-0">
    <div class="inner-page-banner heading-title-behind text-center">
      <div class="heading heading-style-title-behind mb-0">
        <div class="heading-title-wrapper">
          <span>Latest News</span>
          <h1 class="text-white heading-title h2 font-weight-semibold">Latest News</h1>
          <ul class="po-bread breadcrumb justify-content-center fadeInUp animated" data-animate="fadeInUp">
            <li class="breadcrumb-item"><a href="index.html">Home</a></li>
            <li class="breadcrumb-item">News</li>
          </ul>
        </div>
      </div>
    </div>
    <div class="container">
      <div class="pb-10 pt-10 page-container row">
        <div class="page-content col-lg-8 mb-8 mb-lg-0">
          <div class="row post-style-3">
            
            

                @if( !empty($latestOne) )  
                    <div class="col-12 mb-6">
                      <div class="card border-0"> <a href="{{ url('news-single/'.$latestOne->slug) }}" class="hover-scale"> <img src="{{ asset('storage/app/public/latest-news/'.$latestOne->image) }}" alt="product 1" class="card-img-top-latest-news image"> </a>
                        <div class="card-body px-0">
                          <div class="mb-2">

                            @if( !empty( $newsCategory[$latestOne->category_id] ) )
                              <a href="#" class="link-hover-dark-primary">{{ $newsCategory[$latestOne->category_id] }}</a>
                            @endif
                            

                          </div>
                          <h5 class="card-title lh-13 letter-spacing-25"> <a href="{{ url('news-single/'.$latestOne->slug) }}" class="link-hover-dark-primary text-capitalize"> {{$latestOne->title}}</a> </h5>
                          <ul class="list-inline">
                            <li class="list-inline-item mr-0"> <span class="text-gray">{{  date("d M, Y", strtotime($latestOne->created_at)) }} by</span> </li>
                            <li class="list-inline-item"> <a href="#" class="link-hover-dark-primary">Admin</a> </li>
                          </ul>
                        </div>
                      </div>
                    </div>
                  
                  @endif

                  @if( !empty($news) )  

                  @php $i=1; @endphp

                  @foreach( $news as $value)
                    

                    <div class="col-md-6 mb-6">
                      <div class="card border-0"> 
                        <a href="{{ url('news-single/'.$value->slug) }}" class="hover-scale"> 
                          <img src="{{ asset('storage/app/public/latest-news/'.$value->image) }}" alt="Latest News" class="card-img-top image" style="height:240px"> 
                        </a>
                        <div class="card-body px-0">
                          <div class="mb-2">
                            @if( !empty( $newsCategory[$value->category_id] ) )
                              <a href="#" class="link-hover-dark-primary">{{$newsCategory[$value->category_id]}}</a>
                            @endif
                            
                          </div>
                          <h5 class="card-title lh-13 letter-spacing-25">
                            <a href="{{ url('news-single/'.$value->slug) }}" class="link-hover-dark-primary text-capitalize">
                             
                              @if( strlen($value->title) > 32)
                                {{ mb_substr($value->title, 0, 32, 'utf-8') }}...
                              @else
                                {{ $value->title }}
                              @endif 
                            </a> 
                          </h5>
                          <ul class="list-inline">
                            <li class="list-inline-item mr-0"> <span class="text-gray">
                              {{  date("d M, Y", strtotime($value->created_at)) }}  by</span> </li>
                            <li class="list-inline-item"> <a href="#" class="link-hover-dark-primary">Admin</a> </li>
                          </ul>
                        </div>
                      </div>
                    </div>


                @endforeach
            @endif
            
  
          </div>

          {!! $news->links('layouts.pagination.frontend-1') !!}
          
        
        </div>

      
        @include('layouts.news-common-right-side')

        
		
      </div>
    </div>
  </div>

  <!-- wrapper-content -->
  

    @endsection