Hi,
I'm creating a timesheet webapplication where only registered users can have access. Offcourse admins should also have the same permissions + additional features.
So the idea is to have 2 filters.
An "auth" and an "admin" filter. As for the admin filter you need to be logged in first.
So the question is should I repeat myself and create in both filters an Auth::check() or extend the auth filter for the admin? Is it also possible to extend filters?
You can simply apply two (auth|admin) filters to your admin routes.
And in admin
filter, just check if user is a admin because log in is already checked by auth filter.
Thank you, I should have payed more attention to the documentation :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community