From 1185e8ab7236e2b28fbefe6cfd2e4077857d3667 Mon Sep 17 00:00:00 2001 From: Eduar Bastidas Date: Wed, 26 May 2021 14:32:00 -0400 Subject: [PATCH] Changed method name of reference to referenceable. --- CHANGELOG.md | 4 ++++ src/Balance.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86637d1..3d50498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `laravel-balance` will be documented in this file +## 1.2.0 - 2021-05-26 + +- Changed name of reference to referenceable method to avoid null properties when eager loading + ## 1.1.1 - 2021-05-26 - Fixed reference polymorphic relationship. diff --git a/src/Balance.php b/src/Balance.php index 7445dea..e9ec00f 100644 --- a/src/Balance.php +++ b/src/Balance.php @@ -55,8 +55,8 @@ public function balanceable() * * @return \Illuminate\Database\Eloquent\Relations\MorphTo */ - public function reference() + public function referenceable() { - return $this->morphTo('referenceable'); + return $this->morphTo(); } }