F
Filament3w 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 Koch3w ago
Sounds weird. Where are you calling this from?
jw
jw3w ago
Thanks for the quick response. Some additional information:
No description
No description
Dennis Koch
Dennis Koch3w ago
That code is quite a bit different though. First one used $this (is that on a page? second one NavigationItem`
jw
jw3w ago
No description
jw
jw3w 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
jw3w ago
No description
jw
jw3w ago
Hi @Dennis Koch, did I provide enough information? Please let me know if you need anything more. Thanks again for your assistance