F
Filament12mo ago
Yaeger

Filament admin is redirecting back to the same page.

When I press Login, it sends me back to that same page without any message. It returns 200 status code and then just displays the same page. Also, the spinner is showing. I probably missed something when installing. Anyone have any idea?
No description
Solution:
```php FilamentView::registerRenderHook( 'panels::head.end', fn (): string => Blade::render('@livewireStyles'), );...
Jump to solution
6 Replies
Yaeger
YaegerOP12mo ago
Hm seems like livewire & alpine isn't loaded on that page inject_assets === false for me. It works when enabling that option. Is there a way to use Panel builder without that option?
Solution
Yaeger
Yaeger12mo ago
FilamentView::registerRenderHook(
'panels::head.end',
fn (): string => Blade::render('@livewireStyles'),
);
FilamentView::registerRenderHook(
'panels::head.end',
fn (): string => Blade::render('@filamentStyles'),
);

FilamentView::registerRenderHook(
'panels::body.end',
fn (): string => Blade::render('@filamentScripts'),
);
FilamentView::registerRenderHook(
'panels::body.end',
fn (): string => Blade::render('@livewireScripts'),
);
FilamentView::registerRenderHook(
'panels::head.end',
fn (): string => Blade::render('@livewireStyles'),
);
FilamentView::registerRenderHook(
'panels::head.end',
fn (): string => Blade::render('@filamentStyles'),
);

FilamentView::registerRenderHook(
'panels::body.end',
fn (): string => Blade::render('@filamentScripts'),
);
FilamentView::registerRenderHook(
'panels::body.end',
fn (): string => Blade::render('@livewireScripts'),
);
Ok managed to do something with render hooks
awcodes
awcodes12mo ago
Something else is going on. You shouldn’t need to do any of this.
Yaeger
YaegerOP12mo ago
Well yea if inject_assets is enabled it all works. It seems like Filament relies on that option
awcodes
awcodes12mo ago
Yep. Panels use injection since it’s the livewire default. You shouldn’t need to do the filament styles and scripts though. They are already part of the base blade layout.
Yaeger
YaegerOP12mo ago
Makes sense, thanks 👍
Want results from more Discord servers?
Add your server