@extends('layouts.admin') @section('title', get_phrase('Ads Post')) @section('admin_layout')

{{ get_phrase('Ads Lists') }}

{{ get_phrase('Add new Ads') }}
@if(count($ads)) @foreach($ads as $key => $add) @php $today = \Carbon\Carbon::now()->startOfDay(); $start = \Carbon\Carbon::parse($add->start_date); $end = \Carbon\Carbon::parse($add->end_date); @endphp @endforeach
# {{ get_phrase('Image') }} {{ get_phrase('Title') }} {{ get_phrase('Type') }} {{ get_phrase('Publish Date') }} {{ get_phrase('Publish Status') }} {{ get_phrase('System Status') }} {{ get_phrase('Action') }}
{{ ++$key }} @if($add->image && file_exists(public_path($add->image))) @else @endif {{ $add->title }} {{ $add->type }} {{ $start->format('d M Y') }}
{{get_phrase('To')}}
{{ $end->format('d M Y') }}
@if($add->status == 0) {{get_phrase('Inactive')}} @elseif(\Carbon\Carbon::now()->startOfDay()->lt(\Carbon\Carbon::parse($add->start_date))) {{get_phrase('Scheduled')}} @elseif(\Carbon\Carbon::now()->startOfDay()->gt(\Carbon\Carbon::parse($add->end_date))) {{get_phrase('Expired')}} @else {{get_phrase('Active')}} @endif @if($add->status == 1) {{get_phrase('Active')}} @else {{get_phrase('Disabled')}} @endif
@else @include('layouts.no_data_found') @endif
@endsection