@extends('layouts.account') @section('title', __('Analytics')) @section('heading', $listing->title) @section('subheading', __('How this listing is doing.')) @section('account')
@foreach ($windows as $window) $days === $window, 'pill-idle' => $days !== $window])> {{ trans_choice('Last day|Last :count days', $window, ['count' => $window]) }} @endforeach
{{ __('View listing') }} {{ __('Promote') }}
@foreach ([ ['label' => __('Enquiry rate'), 'value' => $totals['enquiry_rate'].'%'], ['label' => __('Enquiries'), 'value' => $totals['enquiries']], ['label' => __('Views'), 'value' => $totals['views']], ['label' => __('Saved'), 'value' => $totals['favourites']], ] as $card)

{{ $card['label'] }}

{{ $card['value'] }}

@endforeach
@php $peak = max(1, $series->max('views')); @endphp

{{ __('Day by day') }}

{{-- Drawn in CSS rather than with a charting library: it is one series of bars, and a page of listings should not download a plotting engine to show it. The table below carries the same numbers for anybody who cannot see the bars. --}}
{{ \Illuminate\Support\Carbon::parse($series->first()['date'])->format('j M') }} {{ \Illuminate\Support\Carbon::parse($series->last()['date'])->format('j M') }}
{{ __('Show the numbers') }}
@foreach ($series->reverse() as $day) @endforeach
{{ __('Date') }} {{ __('Views') }} {{ __('Enquiries') }}
{{ \Illuminate\Support\Carbon::parse($day['date'])->format('j M Y') }} {{ $day['views'] }} {{ $day['enquiries'] }}
@endsection