Make MappedMorphTo available on all models

In case extensions want to add that kind of relationship to an existing
model (there’s no way to include traits at runtime)
This commit is contained in:
Toby Zerner 2015-05-14 22:36:34 +09:30
parent a849bdaa50
commit 6c0f694354
2 changed files with 2 additions and 4 deletions

View File

@ -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.

View File

@ -1,11 +1,7 @@
<?php namespace Flarum\Core\Models;
use Flarum\Core\Support\MappedMorphToTrait;
class Notification extends Model
{
use MappedMorphToTrait;
/**
* The table associated with the model.
*