@extends('dashboard.layouts.master') @section('title', 'Profile') @php $user = auth()->user(); $roles = $user ? $user->getRoleNames()->toArray() : []; @endphp @section('content')

Profile

Profile Details
$user->name
{{ $user->name }}
@foreach($roles as $role) {{ $role }} @endforeach

Permissions
@if(auth()->user()->hasRole('super-admin')) All Permissions @else @foreach($user->getAllPermissions() as $permission) {{ $permission->name }} @endforeach @endif

About
  • Email: {{ $user->email }}
  • Phone: {{ $user->phone ?? 'N/A' }}
  • Joined: {{ $user->created_at->format('M d, Y') }}
Notifications
@forelse ($notifications as $notification) @if($notification->read_at)
@else
@csrf @method('PATCH')
New @endif {{ config('app.name') }}
{{ now()->diffInMinutes($notification->created_at) }}m ago {{ $notification->data['title'] }}
{{ $notification->data['message'] }}
{{ $notification->created_at->format('M d, Y H:i') }}
@empty

No notifications available.

@endforelse
{{ $notifications->links('pagination::bootstrap-4') }}
@if(isAffiliater())
Total Earnings

Rs. {{ number_format($totalEarnings ?? 0, 2) }}

This includes all earnings from your affiliate activities.
@forelse($affiliatePurchaseLogs as $key => $log) @empty @endforelse
# Order ID Order Total Commission Status Date
{{ $affiliatePurchaseLogs->firstItem() + $key }} {{ $log->order_id }} Rs. {{ number_format($log->total_amount, 2) }} Rs. {{ number_format($log->commission, 2) }} ({{ $log->commission_rate }}%) {{ $log->status == 1 ? 'Paid' : ($log->status == 0 ? 'Pending' : 'Rejected') }} {{ $log->created_at->format('M d, Y') }}
No earnings recorded yet.
{{ $affiliatePurchaseLogs->links('pagination::bootstrap-4') }}
@endif
@endsection