From 23caaf668a8e766f1b0303bac18c33ff9e057e0b Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 14 May 2015 22:36:34 +0930 Subject: [PATCH] Make MappedMorphTo available on all models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case extensions want to add that kind of relationship to an existing model (there’s no way to include traits at runtime) --- src/Core/Models/Model.php | 2 ++ src/Core/Models/Notification.php | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Core/Models/Model.php b/src/Core/Models/Model.php index fa6a7e7a7..0aae45949 100755 --- a/src/Core/Models/Model.php +++ b/src/Core/Models/Model.php @@ -5,10 +5,12 @@ use Illuminate\Database\Eloquent\Model as Eloquent; use Flarum\Core\Exceptions\ValidationFailureException; use Flarum\Core\Exceptions\PermissionDeniedException; use Flarum\Core\Support\EventGenerator; +use Flarum\Core\Support\MappedMorphToTrait; class Model extends Eloquent { use EventGenerator; + use MappedMorphToTrait; /** * Disable timestamps. diff --git a/src/Core/Models/Notification.php b/src/Core/Models/Notification.php index c22ce49e5..1aab33e72 100644 --- a/src/Core/Models/Notification.php +++ b/src/Core/Models/Notification.php @@ -1,11 +1,7 @@