Question By
Solved

Protecting Folio routes with roles and/or permissions

Solved
willog

Apr 14th, 2025 09:09 AM

Hi!

I'm using Laravel Folio and Volt in resources/themes/{theme}/pages/somePage, and I’d like to restrict access to certain pages so that only users with specific roles or permissions can view them.

I believe what I really need is a way to protect the route associated with those pages. What’s the best way to handle this, if possible?

Thanks in advance!

bobbyiliev

Apr 15th, 2025 12:28 AM

Best Answer

Hey!

Yep, you should be able to do that with a middleware:

https://laravel.com/docs/12.x/folio#middleware

Let me know how it goes!