user(); } /** * Get the team that owns the subscription. */ public function user() { return $this->belongsTo(Spark::teamModel(), 'team_id'); } /** * Get the "provider_plan" attribute from the model. * * @return string */ public function getProviderPlanAttribute() { return Spark::billsUsingStripe() ? $this->stripe_plan : $this->braintree_plan; } }