@extends('front.layouts.master') @section('content') @php $blog=App\Models\Page::where('name','Blog')->first(); @endphp

Blog

@if(isset($blogs)) @if($blogs->count() > 0) @foreach($blogs as $blog) @endforeach {{ $blogs->appends(['search' => request()->query('search')]) ->links() }} @else @endif @endif @if(isset($category_blogs)) @if($category_blogs->count() > 0) @foreach($category_blogs as $category_blog) @endforeach {{ $category_blogs->appends(['search' => request()->query('search')]) ->links() }} @else @endif @endif
@php $categories=App\Models\Category::all(); @endphp @php $tags=App\Models\Tag::all(); $popular_blogs=App\Models\Blog::where('blog_type','popular')->where([['status',1]])->OrderBy('weight','asc')->take(4)->get(); @endphp
@endsection