Skip to content

Commit b21403c

Browse files
authored
Replaced hardcoded OrderItem class with configurable model binding (#326)
1 parent 64b511e commit b21403c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Console/Commands/SyncSubscriptionPlans.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Illuminate\Console\Command;
66
use Laravel\Cashier\Cashier;
7-
use Laravel\Cashier\Order\OrderItem;
87
use Laravel\Cashier\Plan\Contracts\PlanRepository;
98
use Laravel\Cashier\Plan\Plan;
109
use Laravel\Cashier\Subscription;
@@ -32,8 +31,8 @@ class SyncSubscriptionPlans extends Command
3231
*/
3332
public function handle(PlanRepository $planRepository)
3433
{
35-
$query = OrderItem::query()
36-
->with('orderable')
34+
$query = (Cashier::$orderItemModel)::query()
35+
->with('orderable')
3736
->unprocessed()
3837
->whereHasMorph('orderable', Cashier::$subscriptionModel);
3938

0 commit comments

Comments
 (0)