-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update zone relation on carrier, country and payment method Model (#265)
* Update zone relation on carrier, country and payment method Model * fix code formatting --------- Co-authored-by: mckenziearts <[email protected]>
- Loading branch information
1 parent
bf6a78d
commit e600dda
Showing
5 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shopper\Core\Traits; | ||
|
||
use Illuminate\Database\Eloquent\Relations\MorphToMany; | ||
use Shopper\Core\Models\Zone; | ||
|
||
trait HasZones | ||
{ | ||
public function zones(): MorphToMany | ||
{ | ||
return $this->morphToMany(Zone::class, 'zonable', shopper_table('zone_has_relations')); | ||
} | ||
} |