@php /** * Portal switcher used at the bottom of every auth page. * * @var string $current Active portal — 'user' | 'merchant' | 'agent' * @var string $page Auth page key used to build routes — * 'login' | 'register' | 'password.request' * @var ?string $heading Optional heading shown above the switcher */ $heading ??= __('Switch portal'); $agentEnabled = (bool) setting('agent_program_enabled', true); $portals = [ 'user' => [ 'route' => 'user.'.$page, 'icon' => 'fa-duotone fa-user', 'label' => __('User'), 'show' => true, ], 'merchant' => [ 'route' => 'merchant.'.$page, 'icon' => 'fa-duotone fa-store', 'label' => __('Merchant'), 'show' => true, ], 'agent' => [ 'route' => 'agent.'.$page, 'icon' => 'fa-duotone fa-user-tie', 'label' => __('Agent'), // Hide the Agent tile entirely when the program is disabled // so users don't tap into a 404. Note: when admin disables // the program, the agent auth pages 404 anyway, so the user // can never land on a page where $current === 'agent'. 'show' => $agentEnabled, ], ]; @endphp

{{ $heading }}