-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Custom Panels URLs (ex: subdomains or any url) #13
Conversation
i need to hide current panel so thats 30c9e00 |
also need to override the url ( 1a14c32 ), because in #7 (comment) it breaked my app, because i have each panel on diff, sub domain, so this must not be relative at all. |
Could you check this? @bezhanSalleh |
You can exclude the current panel already via So for the paths, what are you doing when you say you have the panels on different subdomains? I need a little bit of context here to see that there might be a better way. been busy with vue for past couple of months so not really up-to date with the new filament features. |
for excluding current panel, didn't think that excludes access closure, okay ill revert this change. i have panels like the following:
i need to switch between them. |
no hurry, take your time. |
ok, i think i have the time to make a release. So, show me the panel configurations. or you can just take the demo app for instance. or if this doesn't make sense give me an example using the |
Panel 1: public function panel(Panel $panel): Panel
{
return $panel
->id('admin')
->path('')
->domain('cp.' . parse_url(config('app.url'))['host'])
->authGuard('admins')
->colors([
'primary' => Color::Blue,
]); Panel 2: public function panel(Panel $panel): Panel
{
return $panel
->id('dev')
->path('')
->domain('dev.' . parse_url(config('app.url'))['host'])
->authGuard('admins')
->colors([
'primary' => Color::Red,
]); Panel 3: public function panel(Panel $panel): Panel
{
return $panel
->id('console')
->path('')
->domain('console.' . parse_url(config('app.url'))['host'])
->authGuard('admins')
->colors([
'primary' => Color::Green,
]); I just wanted to use URLs like the following: PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
$panelSwitch
->urls([
'admin' => 'https://' . 'cp.' . parse_url(config('app.url'))['host'],
'dev' => 'https://' . 'dev.' . parse_url(config('app.url'))['host'],
'console' => 'https://' . 'console.' . parse_url(config('app.url'))['host'],
]);
}); |
this should be handled by the plugin automatically. which now it does 😎. |
@bezhanSalleh okay it works, thanks ♥ btw, is there a way to show this switch on auth screens too ? |
i need to hide current panel so thats 30c9e00
also need to override the url ( 1a14c32 ), because in #7 (comment) it breaked my app, because i have each panel on diff, sub domain, so this must not be relative at all.