public function newSubscription($subscription, $plan)
    {
        $container = Container::getInstance();

        if (method_exists($container, 'makeWith')) {
            return $container->makeWith(SubscriptionBuilderInterface::class, [
                'user' => $this, 'name' => $subscription, 'plan' => $plan
            ]);
        }

        return $container->make(SubscriptionBuilderInterface::class, [$this, $subscription, $plan]);
    }
public function newSubscription($subscription, $plan)
    {
        $container = Container::getInstance();

        if (method_exists($container, 'makeWith')) {
            return $container->makeWith(SubscriptionBuilderInterface::class, [
                'user' => $this, 'name' => $subscription, 'plan' => $plan
            ]);
        }

        return $container->make(SubscriptionBuilderInterface::class, [$this, $subscription, $plan]);
    }
public function newSubscription ( $ subscription , $ plan ) { $ container = Container :: getInstance ( ) ; if ( method_exists ( $ container , 'makeWith' ) ) { return $ container -> makeWith ( SubscriptionBuilderInterface :: class , [ 'user' => $ this , 'name' => $ subscription , 'plan' => $ plan ] ) ; } return $ container -> make ( SubscriptionBuilderInterface :: class , [ $ this , $ subscription , $ plan ] ) ; }
Subscribe user to a new plan.

@param string $subscription
@param mixed $plan
@return \Gerardojbaez\Laraplans\Models\PlanSubscription
Subscribe user to a new plan .