@extends('layouts.app') @section("breadcrumb")
  • @lang('menu.notifications')
  • @endsection @section('content')

    @lang('menu.notifications')

    @php $user = App\Model\User::find(Auth::id()); @endphp @if($type == "renew-registrations") @php ($type = "App\Notifications\RenewRegistration") @php ($msg = __('fleet.reg_certificate')) @elseif($type == "renew-insurance") @php ($type = "App\Notifications\RenewInsurance") @php ($msg = __('fleet.vehicle_insurance')) @elseif ($type = "renew-licence") @php ($type = "App\Notifications\RenewVehicleLicence") @php ($msg = __('fleet.vehicle_licence')) @else @php ($type = "App\Notifications\RenewalCertificate") @endif @foreach ($user->unreadNotifications as $notification) @if($notification->type==$type) @php($notification->markAsRead()) @endif @endforeach @foreach($vehicle as $data) @foreach ($user->notifications as $notification) @if($notification->type == $type) @php ($to = \Carbon\Carbon::now()) @php ($from = \Carbon\Carbon::createFromFormat('Y-m-d', $notification->data['date'])) @php ($diff_in_days = $to->diffInDays($from)) @if($data->id == $notification->data['vid']) @endif @endif @endforeach @endforeach
    @lang('fleet.vehicles') @lang('fleet.vehicleImage') @lang('fleet.notification') @lang('fleet.remaining_days')
    {{$data->make}}
    {{$data->model}}
    @if($data->vehicle_image != null) @else @endif {{ $msg }} {{ $notification->data['msg'] }} {{$diff_in_days}}
    @endsection