@extends('user.layouts.app') @php // Byte conversion function formatBytes($size, $precision = 2) { $base = log($size, 1024); $suffixes = array('', 'kB', 'MB', 'GB', 'TB'); $result = round(pow(1024, $base - floor($base)), $precision) .''. $suffixes[floor($base)]; if($result != "NAN ") { return $result; } else { return $result = 0; } } @endphp @section('content')
{{-- Access deined --}} @if(Session::has("access")) @endif {{-- Failed --}} @if(Session::has("failed")) @endif {{-- Success --}} @if(Session::has("success")) @endif
{{-- Current plan --}}
{{ __('Current Plan') }}
@if ($active_plan->price == 0)

{{ __($active_plan->name) }}

{{ __('FREE PLAN') }}

@else

{{ __($active_plan->name) }}

{{ __('Remaining Days') }} : {{ $remaining_days > 0 ? (int) $remaining_days . __(' Day(s) Left') : __('Plan Expired!') }}

@endif {{ __('Show details') }}
{{-- Optimize --}}
{{ __('Today Optimize Images') }}

{{ $today_optimers_count }}

{{ __('Show details') }}
{{ __('Today Saved') }}

{{ $today_optimized_image_size != 0 ? formatBytes($today_optimized_image_size) : 0 }}

{{ __('Show details') }}
{{ __('Storage Usage') }}

{{ $storageUsage != 0 ? formatBytes($storageUsage) : 0 }} {{ __('of') }} {{ $current_storage != 0 ? formatBytes($current_storage) : 0 }}

{{ number_format((float)$storageUsage/$current_storage*100, 2, '.', '') }}%

{{ __('Used') }}
{{ __('Free') }}
{{-- Recent Optimize --}}

{{ __('Recent 10 Optimizes') }}

{{-- Optimize images --}} @foreach ($optimers as $optimer) @endforeach
{{ __('S.No') }} {{ __('Uploaded on') }} {{ __('Name') }} {{ __('Actions') }}
{{ $loop->iteration }} {{ formatDateForUser($optimer->created_at) }}
{{ __('File Name') }} : {{ Str::ucfirst($optimer->name) }}
{{ __('File Size') }} : {{ formatBytes($optimer->actual_image_size) }} | {{ __('Saved Size') }} : {{ formatBytes($optimer->optimized_image_size) }}
{{-- Footer --}} @include('user.includes.footer')
{{-- Delete Optimize Modal --}} {{-- Custom JS --}} @section('custom-js')