Skip to content

Commit

Permalink
fix: subscriptions and transactions relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
hypnodev committed Aug 29, 2020
1 parent a26284b commit 4104fb5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Traits/BillableWithPaypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
namespace hypnodev\Larapal\Traits;

use hypnodev\Larapal\{
Subscription,
Transaction
Transaction,
Subscription
};
use hypnodev\Larapal\Models\{
PaypalSubscription,
PaypalTransaction
};

trait BillableWithPaypal
Expand Down Expand Up @@ -59,7 +63,7 @@ public function subscribeWithPaypal(string $planId)
*/
public function paypalSubscriptions()
{
return $this->hasMany(Subscription::class);
return $this->hasMany(PaypalSubscription::class);
}

/**
Expand All @@ -69,7 +73,7 @@ public function paypalSubscriptions()
*/
public function paypalTransactions()
{
return $this->hasMany(Transaction::class);
return $this->hasMany(PaypalTransaction::class);
}

/**
Expand Down

0 comments on commit 4104fb5

Please sign in to comment.