Terms and conditions
Hello guys!
I have a problem and not sure how to solve it.
I have a page and livewire component Terms and Conditions.
What i need is, when user registers for the first time, it should take him to the page where Terms and Conditions are declared, and there is a checkbox which looks like that :
So the idea is, when he gets there, he should be still able to see the look of filament, but absolutely nothing else that Terms and conditions and checkbox.
The blade file :
I'm literally running out of ideas, so looking forward to your answers!
7 Replies
What are you using for user registration?
filament-breezy
Maybe ask in #breezy to get more ideas... but I'm thinking you could probably do this with a Filament middleware. Add a column to your
users
table (e.g. has_agreed_to_terms
) and then in your middleware, when a user logs in, check this to determine if they should be redirected to the Terms page or to the Dashboard.You can find an example of middleware here to get you started :
https://filamentphp.com/tricks/redirect-in-case-canaccessfilament-fails
Filament
Redirect in case canAccessFilament fails by Quadrubo - Tricks - Fil...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
Hey, thanks a lot for an answer. I've already tried breezy, and from what I could see, there is no something like that there.
The column is created, and the checkbox which is pointing it to 'users' table in DB.
Ok, i will check this with the Middleware tomorrow and keep you updated.
Thank you very much!!!!!
I'd add a middleware similar to Laravel
verified
middleware that redirects to that page as long as a column is not set to true.
he should be still able to see the look of filament,You might need to create your own layout without header and sidebar or use the layout that Filament uses for the auth route.
This should be the solution. I will soon start implementing this and will keep you guys updated, but I am very optimistic!