Open jmshofstall opened 6 years ago
How do we check if the user has a subscription to plan 'x' or if the user is subscribed to any plan? I looked through the source and didn't see anything on it.
Add a relationship in User.php that query subscriptions table to find subscription with given plan id.
public function subscribed($planId){ return $this->subscriptions()->wherePlanId($planId)->first(); }
How do we check if the user has a subscription to plan 'x' or if the user is subscribed to any plan? I looked through the source and didn't see anything on it.