@extends('frontend.layouts.main') @section('title', $seo['title'] ?? '') @section('keywords', $seo['keywords'] ?? '') @section('description', $seo['description'] ?? '') @section('image', asset($header['seo_home']->image_path)) @section('abstract', $seo['abstract'] ?? '') @section('css') @endsection @section('content') @include('frontend.components.breadcrumbs', ['caetgory' => $category, 'parents' => $category->parentsRecursiveLimit(3)]) {{-- Danh mục không có con thì dùng layout này --}} @if(count($category->childs) > 0) @foreach($category->childs()->where('active', 1)->orderBy('order')->get() as $child) {{$child->name}} @endforeach Tin tức mới @foreach($data->take(8) as $item) {{$item->name}} {{$item->created_at->format('d-m-Y')}} {{$item->category->name}} {{$item->description}} @endforeach @foreach($category->childs()->where('active', 1)->orderBy('order')->get() as $child) @php $dataPosts = getPostByCategory($child, 4); @endphp @if(count($dataPosts) > 0) {{$child->name}} Xem chi tiết @foreach($dataPosts as $item) @include('frontend.components.posts.item1', ['data' => $item]) @endforeach @endif @endforeach @else @if (!empty($data) && count($data) > 0) {{-- {{$category->name}} --}} @if(count($data) > 5) @foreach($data as $item) @include('frontend.components.posts.item1', ['data' => $item]) @endforeach {{ $data->links() }} @endif @else Đang cập nhật nội dung! @endif @endif @endsection @section('js') @endsection
Đang cập nhật nội dung!