how to make custom route accessible only to certain subscription levels

Laraship QuestionsCategory: Technicalhow to make custom route accessible only to certain subscription levels
george gall asked 4 months ago
I looked at the documentation but couldn\'t find the answer there Suppose I have a custom route in web.php that gets to a controller function that returns a view.  I need this view accessible only to silver and gold members but not to bronze members of a certain subscription ?   How can I do that ?
2 Answers
laraship Staff answered 3 months ago
Hello, We suggest creating a middleware that checks user current subscriptions, and if the current subscription is available then you pass the request , otherwise you can show your 403 page for example
Saeed Matar Staff answered 3 months ago
Hello,
from the features form you can set the related urls for it,
the related urls accept multiple urls and in our subscription middleware it use laravel url check 
request()->is(['members','posts/create']);