Skip to content

Commit

Permalink
HasAddress trait
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineOmega committed May 9, 2020
1 parent 652a63d commit 44adef1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Traits/HasAddress.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace DivineOmega\LaravelAddresses\Traits;

use DivineOmega\LaravelAddresses\Models\Address;

trait HasAddress
{
public function address()
{
return $this->morphOne(Address::class, 'addressable');
}
}

0 comments on commit 44adef1

Please sign in to comment.