PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

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!