Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dahall4's avatar

Blocking Routes with Subscription Middleware

Hi All,

Here's my situation. I've got two plans. Basic and Premium. You can pay monthly or yearly for either plan. I'd like to use Spark's subscription middleware to block certain routes based on which plan the user is on. Something like this:

Route::group(['middleware' => 'subscribed:premium'], function () {

Where "premium" would include both the monthly and yearly premium payment plans. I feel like I'm missing something as this should be super simple, but I can't find where to change the subscription names. Any help would be greatly appreciated!

0 likes
0 replies

Please or to participate in this conversation.