Skip to content

Commit

Permalink
Rename to model
Browse files Browse the repository at this point in the history
Signed-off-by: Lloric Mayuga Garcia <lloricode@gmail.com>
  • Loading branch information
lloricode committed Apr 12, 2021
1 parent 8635b0f commit bf155ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/*
* Model to use
*/
'implementation' => BeyondCode\Vouchers\Models\Voucher::class,
'model' => BeyondCode\Vouchers\Models\Voucher::class,

/*
* Database pivot table name for vouchers and users relation
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HasVouchers.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ trait HasVouchers
*/
public function vouchers()
{
return $this->morphMany(config('vouchers.implementation', Voucher::class), 'model');
return $this->morphMany(config('vouchers.model', Voucher::class), 'model');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Vouchers.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Vouchers
public function __construct(VoucherGenerator $generator)
{
$this->generator = $generator;
$this->voucherModel = app(config('vouchers.implementation', Voucher::class));
$this->voucherModel = app(config('vouchers.model', Voucher::class));
}

/**
Expand Down

0 comments on commit bf155ce

Please sign in to comment.