@extends('client.layouts.main') @section('title', 'Hosting Details') @section('content')
Account Information
@if($hosting->status === 'active') @endif
Domain

{{ $hosting->domain }}

Username

{{ $hosting->username }}

Package

{{ $hosting->product->name ?? '-' }}

Server

{{ $hosting->server->name ?? '-' }}

Dedicated IP

{{ $hosting->dedicated_ip ?? '-' }}

Status

@php $statusColors = [ 'active' => 'success', 'pending' => 'warning', 'suspended' => 'danger', 'terminated' => 'default', 'cancelled' => 'default', ]; @endphp {{ ucfirst($hosting->status) }}

Billing Information
Registration Date

{{ $hosting->registration_date ? $hosting->registration_date->format('M d, Y') : '-' }}

Next Due Date

{{ $hosting->next_due_date ? $hosting->next_due_date->format('M d, Y') : '-' }}

Renewal Price

{{ number_format($hosting->renewal_price, 2) }}

Billing Cycle

{{ $hosting->billingCycle->name ?? '-' }}

@if($hosting->status === 'active' && $hosting->server && $hosting->username)
Resource Usage
@csrf
@if(session('usage')) @php $usage = session('usage'); @endphp
Disk Usage

{{ number_format($usage->diskUsedMb, 1) }} MB / {{ $usage->diskLimitMb > 0 ? number_format($usage->diskLimitMb, 0) . ' MB' : 'Unlimited' }}

@if($usage->diskLimitMb > 0) @php $diskPercent = min(100, ($usage->diskUsedMb / $usage->diskLimitMb) * 100); @endphp
@endif
Bandwidth

{{ number_format($usage->bandwidthUsedMb, 1) }} MB / {{ $usage->bandwidthLimitMb > 0 ? number_format($usage->bandwidthLimitMb, 0) . ' MB' : 'Unlimited' }}

@if($usage->bandwidthLimitMb > 0) @php $bwPercent = min(100, ($usage->bandwidthUsedMb / $usage->bandwidthLimitMb) * 100); @endphp
@endif
Emails

{{ $usage->emailAccountCount }}

Databases

{{ $usage->databaseCount }}

Addon Domains

{{ $usage->addonDomainCount }}

@else @endif
@endif
Change Password
@csrf
@if ($errors->has('password')) {{ $errors->first('password') }} @endif
Request Cancellation
@if(!$hosting->cancel_requested)
@csrf
@if ($errors->has('cancel_type')) {{ $errors->first('cancel_type') }} @endif
@if ($errors->has('cancel_reason')) {{ $errors->first('cancel_reason') }} @endif
@else
Cancellation Requested

A cancellation request has already been submitted for this hosting account.

@endif
@endsection