@extends('layouts.mobile')
@section('title', 'Notifications - Gletra')
@push('styles')
@endpush
@section('content')
@if(auth()->check())
@php
$notifications = auth()->user()->notifications()->paginate(20);
$unreadCount = auth()->user()->unreadNotifications->count();
$totalCount = auth()->user()->notifications()->count();
@endphp
Stay Updated
Orders, offers & important alerts in one place
{{ $unreadCount }}
Unread
@if($unreadCount > 0)
Recent Alerts
@endif
@forelse($notifications as $notification)
{{ $notification->data['title'] ?? 'System Alert' }}
{{ $notification->created_at->diffForHumans(null, true) }}
{{ $notification->data['message'] ?? '' }}
@if(isset($notification->data['action_url']))
View Details
@endif
@empty
No notifications yet
We'll notify you when something important happens.
@endforelse
@if($notifications->hasPages())
@endif
@else
Please Login
Login to see your personalized notifications and updates.
Login / Sign Up
@endif
@endsection