F
Filament5mo ago
jw

Filament::getPanel('user')->getUrl(); - Potential Bug?

Hello, I was calling this function within a loop. The first time it correctly gives me the 'user' panel URL. On subsequent calls it seems to ignore the 'user' parameter and returns the url of the default panel ('admin'). I tried splitting the function out to: $panel = Filament::getPanel('user'); $url = $panel->getUrl(); Has anyone come across this before or could offer an explanation? Thanks
7 Replies
Dennis Koch
Dennis Koch5mo ago
Sounds weird. Where are you calling this from?
jw
jw5mo ago
Thanks for the quick response. Some additional information:
No description
No description
Dennis Koch
Dennis Koch5mo ago
That code is quite a bit different though. First one used $this (is that on a page? second one NavigationItem`
jw
jw5mo ago
No description
jw
jw5mo ago
The first two images I sent are from the Filament codebase "namespace Filament\Panel\Concerns\HasRoutes.php" It's strange, as it's giving me a different result between iterations of a loop, calling the same code
jw
jw5mo ago
No description
jw
jw5mo ago
Hi @Dennis Koch, did I provide enough information? Please let me know if you need anything more. Thanks again for your assistance
Want results from more Discord servers?
Add your server