@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
@if(Auth::user()->role ==2)
@php
$sub = App\Models\Subscription::where('user_id',Auth::user()->id)->where('status',1)->first();
if($sub)
{
$endDate = \Carbon\Carbon::parse($sub->end_date);
// Calculate the number of days remaining
$daysRemaining = now()->diffInDays($endDate);
$pc= App\Models\Package::where('id',$sub->package)->first();
}
$wallet = App\Models\Wallet::where('user_id',Auth::user()->id)->first();
@endphp
Welcome Back {{Auth::user()->name}}
@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
Ksh {{$wallet->amount}} Top Up
@if($sub)
{{$daysRemaining}} days until ({{$sub->end_date}})
@else
Subscription Expired
@endif
The approximate number of days during which services will be provided based on the amount on the account balance
| Service |
Plan |
Status |
Price |
@if($sub)
| Internet |
{{$pc->name}} |
@if($online_status == 'online')
{{'online'}} |
@endif
@if($online_status == 'offline')
{{'offline'}}
@endif
Ksh {{number_format($pc->price,2)}} |
@endif
@endif
@if(Auth::user()->role == 1)
Statistics
@endif
@if(Auth::user()->role == 3)
Statistics
| User |
Region |
Location |
Subject |
Message |
Status |
Actions |
@foreach($tickets as $ticket)
@php
$user = App\Models\User::where('id',$ticket->user_id)->first();
$region = App\Models\Region::where('id',$user->region)->first();
@endphp
| {{$user->name}} |
@if($region)
{{$region->name}} |
@else
N/A |
@endif
{{$user->location}} |
{{$ticket->subject}} |
{{$ticket->message}} |
@if($ticket->status == 1)
Success
|
@else
Pending
|
@endif
|
@endforeach
@endif
@endsection