custom login page: render hooks or override class?
i would like to achieve a login page as attached. whats the easiest/ most efficient way to do this? i have never customized a login page before, but already looked through some of the available tutorials out there.
14 Replies
Override class IMO
i tried something like
but got this error
Attempt to read property "childNodes" on null
Can you explain more? basically you have to do like this:
1. create filament-page or livewire components
2. override
->login()
in panel configuration. eg: $panel->login(MyNewLogin::class)
yeah im doing that. currently i have
im not sure where is this from, i think its the simplepage layout
I though you ask about opinion on
hook
vs custom class
Can you tell which problem you're facing exactly?
If your blade has this <x-filament-panels::page.simple>
that's means it's simple page layoutyeah at first i need opinion and then need to know how to do it since its my first time haha
in my custom layout i have this
then i coded my custom-login and got this result
seems like its working now. btw, later on after finished designing, for the login form i should reuse/override the existing methods right
anyway, i dunno if what i did is is the best practice. feel free to gimme your opinion
Suggest to watch this as well for changing the form https://www.youtube.com/watch?v=nQmAqTiepYs
Filament Daily
YouTube
Filament: Login with Username or Email
If you want to override the default email/password form of Filament to accept username, I will show you how to do it, in this video.
More Filament examples on our website: https://filamentexamples.com
yeah i have watched this before, he reused the methods hence maintaining the design. my case here requires a whole redesign of the page
I don't see "whole redesign" based on image, cause for your Social login you'll need to hit different route.. and
email/password
is still the same.. all you have to do is make sure they checked terms
first..
If you meant "UI" then yes, whole redesign.. but the logic is still the same
I can be wrong tho.. since you extends BaseLogin try checking what that "BaseLogin" provide and you'll understand what to override etc easily IMO (https://github.com/filamentphp/filament/blob/3.x/packages/panels/src/Pages/Auth/Login.php)thanks for your inputs. ill try first