Skip to content

Commit

Permalink
Fix n+1 problem with subscription retrieval (#1009)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Oct 5, 2020
1 parent 1f5cf6b commit 9a79e6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Concerns/ManagesSubscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function subscribed($name = 'default', $plan = null)
*/
public function subscription($name = 'default')
{
return $this->subscriptions()->where('name', $name)->first();
return $this->subscriptions->where('name', $name)->first();
}

/**
Expand Down

0 comments on commit 9a79e6d

Please sign in to comment.