Skip to content

Commit 1185e8a

Browse files
committed
Changed method name of reference to referenceable.
1 parent 56ba943 commit 1185e8a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-balance` will be documented in this file
44

5+
## 1.2.0 - 2021-05-26
6+
7+
- Changed name of reference to referenceable method to avoid null properties when eager loading
8+
59
## 1.1.1 - 2021-05-26
610

711
- Fixed reference polymorphic relationship.

src/Balance.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public function balanceable()
5555
*
5656
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
5757
*/
58-
public function reference()
58+
public function referenceable()
5959
{
60-
return $this->morphTo('referenceable');
60+
return $this->morphTo();
6161
}
6262
}

0 commit comments

Comments
 (0)