<?php
use App\Post;

$prev = Post::where('id', $model->id-1)->where('status', 1)->first();
$next = Post::where('id', $model->id+1)->where('status', 1)->first();
?>
@extends('front.layout')
@section('title')
{{$model->meta_title}}
@endsection
@section('description')
{{$model->meta_description}}
@endsection
@section('content')
@if(!empty($model) )
<section class="page-banner bg-overlay" style="background-image: url({{asset(Config("params.media_path.large").$model->image)}});">
            <div class="page-inner-box col-md-6 text-center text-white">
                <h1 class="text-uppercase">{{$model->title}}</h1>
            </div>
        </section>


     <section class="py-lg-5 py-3" id="blog-detail">
            <div class="container position-relative">
                <div class="blog-socials">
                    <a href="#"><i class="fab fa-facebook-f"></i></a>
                    <a href="#"><i class="fab fa-twitter"></i></a>
                    <a href="#"><i class="far fa-envelope"></i></a>
                    <a href="#"><i class="fab fa-linkedin-in"></i></a>
                </div>
                <div class="row justify-content-center">
                    <div class="col-lg-9">
                        <h2>{{$category[0]->title}}</h2>
                        
                        <?php echo $model->description?>
                       

                        <div class="mt-5 text-center">
                            @if(($model->id-1)!=0)
                             <a href="{{url("blog/".($prev->key))}}" class="btn btn-lg btn-primary mr-2">Previous</a> 
                           @endif
                        
                           @if(!empty($incData) )
                           <a href="{{url("blog/".($next->key))}}" class="btn btn-lg btn-primary ml-2">Next</a>
                        @endif
                        </div>
                       @include('front/common/subscribers')
                    </div>
                </div>
            </div>
        </section>
@endif
@endsection