public function subscribed($subscription = 'default', $plan = null)
    {
        $subscription = $this->subscription($subscription);

        if (is_null($subscription)) {
            return false;
        }

        if (is_null($plan)) {
            return $subscription->valid();
        }

        return $subscription->valid() &&
               $subscription->stripe_plan === $plan;
    }
public function subscribed($subscription = 'default', $plan = null)
    {
        $subscription = $this->subscription($subscription);

        if (is_null($subscription)) {
            return false;
        }

        if (is_null($plan)) {
            return $subscription->valid();
        }

        return $subscription->valid() &&
               $subscription->stripe_plan === $plan;
    }
public function subscribed ( $ subscription = 'default' , $ plan = null ) { $ subscription = $ this -> subscription ( $ subscription ) ; if ( is_null ( $ subscription ) ) { return false ; } if ( is_null ( $ plan ) ) { return $ subscription -> valid ( ) ; } return $ subscription -> valid ( ) && $ subscription -> stripe_plan === $ plan ; }
Determine if the Stripe model has a given subscription.

@param  string  $subscription
@param  string|null  $plan
@return bool
Determine if the Stripe model has a given subscription .