Page without tenancy

Hi guys! I am looking for a way to build a custom page to let the user manage their personal API token. But I can't make it work that it is just "/api-tokens". It is always using "/team/{tenant}/api-tokens/". So how to build a custom page working like "/profile" even with tenancy enabled? Thanks in advance for any help!
5 Replies
Dennis Koch
Dennis Koch3w ago
Use the "simple layout". I think currently that's the only way.
public function getLayout(): string
{
return 'filament-panels::components.layout.simple';
}
public function getLayout(): string
{
return 'filament-panels::components.layout.simple';
}
AlexDev
AlexDevOP3w ago
Hi Dennis! How could that work? <?php namespace App\Filament\Pages; use Filament\Pages\SimplePage; class ApiTokens extends SimplePage { //protected string $view = 'filament.pages.api-tokens'; } If I open /api-tokens it leads to "404 Not Found"
Dennis Koch
Dennis Koch3w ago
What's the output of php artisan route:list?
AlexDev
AlexDevOP3w ago
Even after php artisan optimize api-tokens is not in there. Nowhere. I guess SimplePage does not register a route. The strange is that "Filament\Auth\Pages\EditProfile" is not a SimplePage. It does extend Page
Dennis Koch
Dennis Koch3w ago
Might be the case. EditProfile can be both and it's managed via getLayout() method. Sorry, I am not sure. I never used Tenancy 🙈

Did you find this page helpful?