{{-- Shell for the buyer/seller dashboard. It sits inside the public layout — an account holder is still a visitor, and losing the header would cut them off from browsing. The side navigation grows as later phases land; entries with no screen yet are simply absent rather than present and dead. --}} @extends('layouts.public') @section('content') @php $user = auth()->user(); $isSeller = $user->isSeller(); $sections = collect([ ['route' => 'account.dashboard', 'label' => __('Overview'), 'icon' => 'layers'], ['route' => 'account.favourites.index', 'label' => __('Saved properties'), 'icon' => 'bookmark'], ['route' => 'account.saved-searches.index', 'label' => __('Saved searches'), 'icon' => 'search'], ['route' => 'account.messages.index', 'label' => __('Messages'), 'icon' => 'inbox'], ['route' => 'account.appointments.index', 'label' => __('Viewings'), 'icon' => 'calendar'], ['route' => 'account.offers.index', 'label' => __('Offers'), 'icon' => 'tag'], ['route' => 'account.leads.index', 'label' => __('Enquiries'), 'icon' => 'users', 'seller' => true], ['route' => 'account.listings.index', 'label' => __('My listings'), 'icon' => 'building', 'seller' => true], ['route' => 'account.reviews.index', 'label' => __('Reviews'), 'icon' => 'quote'], ['route' => 'account.analytics.index', 'label' => __('Analytics'), 'icon' => 'chart', 'seller' => true], ['route' => 'account.billing.index', 'label' => __('Billing'), 'icon' => 'tag', 'seller' => true], ['route' => 'account.profile.edit', 'label' => __('Profile & settings'), 'icon' => 'users'], ]) ->filter(fn (array $item) => Route::has($item['route'])) // A buyer has no listings screen to be shown an empty version of. ->reject(fn (array $item) => ($item['seller'] ?? false) && ! $isSeller); @endphp
@yield('subheading')
@endif