qirolab / laravel-themer

Multi theme support for Laravel application
https://qirolab.com
MIT License
369 stars 50 forks source link

The Middleware in my opinion doesn't work properly. #23

Closed RyanSacks closed 2 years ago

RyanSacks commented 2 years ago

I have a page and a route "a" that belongs to theme1. I added the Middleware to the Kernel and added a Middleware on this route in web.php and set it to "theme:theme1". Right now the active theme is set to theme2 in config/theme.php but when I go to /a I still see the page, it should not allow you to view the page, that's the whole point of a Middleware. Did I do something wrong?

hkp22 commented 2 years ago

@RyanSacks I think you misunderstood the theme middleware. Here theme Middleware's responsibility is to set your app theme. It is not going to handle permissions.