What part of code signifies which panel does a page belong to?
I have 2 panels, one guest and one admin. Guest panel has quizzes on them. Some quizzes need Auth, so for the ones that do, I redirect them to a quiz page on the admin panel but it doesn't ask for auth (which means that page belongs to the Guest panel, even though i chose Admin panel when creating the page)
4 Replies
the url dictates which panel is using a resource, a resource can belong to multiple panels
the url is set for both the panels, but the page under admin isn't really under the admin panel because if it was it would ask for auth
the first one works fine because guest panel is the default panel, but the second one doesn't
If everything was working right then on the second route it should ask me for Auth first
you need to apply the auth middleware to the second endpoint then?
Well that isn't what I am trying to do. showquiz, and showquiz auth are both the same filament pages. Except that showquiz belongs to guest (guest panel has no auth), and showquizauth belongs to admin (which has auth)
So a user would go on the guest panel by default where he sees all the quizzes. If a quiz requires auth, it will redirect to the showquiz auth page which belongs to the admin panel. and since admin panel requires auth, it should ask for auth too.