FilamentF
Filament16mo ago
rabol

Filament::getPanel('dashboard')->getUrl() returns the wrong url

I have a laravel app, based on JetStream, I have two panels, Admin and Dashboard

in my
resources/navigation-menu.blade.php
I have this:

<!-- Logo -->
<div class="shrink-0 flex items-center">
    <a href="{{ Filament::getPanel('dashboard')->getUrl()  }}">
      <x-application-mark class="block h-9 w-auto"/>
    </a>
</div>


but.... the url is mysite.test/admin and not mysite.test/dashboard


if I then create a simple view like this:

@php
    use Filament\Facades\Filament;
@endphp

<x-app-layout>
    <x-slot name="header">
        <h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
            {{ __('Simple') }}
        </h2>
    </x-slot>

    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white dark:bg-gray-800 overflow-hidden shadow-xl sm:rounded-lg">
                <a href="{{ Filament::getPanel('dashboard')->getUrl() }}">dashboard</a>
            </div>
        </div>
    </div>
</x-app-layout>

the url is ok in the view but not in the menu
Was this page helpful?