@extends('website.layouts.master') {{--@section('title') {{__('website.special_offers')}} @stop--}} @section('css') @stop @section('script.title') @stop @section('content')
@forelse($blogs as $blog) @php $blog_translation = $blog->translations->where('language_id',getLocaleId())->first(); @endphp
@empty

{{ trans('theme.notify.nothing_found') }}

@endforelse

{{ trans('theme.search') }}

{!! Form::open(['route' => ['blog.search'], 'method' => 'GET', 'id' => 'form', 'class' => 'form-inline', 'role' => 'form', 'data-toggle' => 'validator']) !!}
{!! Form::text('q', null, ['class' => 'form-control flat', 'placeholder' => trans('theme.placeholder.search'), 'required']) !!} {{--
--}} {{-- --}} {{--
--}}
{!! Form::close() !!}

{{ trans('theme.recent_posts') }}

@foreach (\App\Helpers\ListHelper::recentBlogs() as $blog) @php $blog_translation = $blog->translations->where('language_id',getLocaleId())->first(); @endphp
{!! $blog_translation->title ?? $blog->title !!}
{{ $blog->published_at->diffForHumans() }}
@endforeach

{{ trans('theme.most_popular') }}

@foreach (\App\Helpers\ListHelper::popularBlogs() as $blog) @php $blog_translation = $blog->translations->where('language_id',getLocaleId())->first(); @endphp
{!! $blog_translation->title ?? $blog->title !!}
{{ $blog->published_at->diffForHumans() }}
@endforeach
@if (isset($tags) && $tags)

{{ trans('theme.tags') }}

@foreach ($tags as $tag) @endforeach
@endif
{{ $blogs->links('vendor.pagination.default') }}
@stop @section('script') @stop