1
0
mirror of https://github.com/flarum/core.git synced 2025-06-05 22:25:29 +02:00

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 9e81e9f955
commit 23caaf668a
2 changed files with 2 additions and 4 deletions

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

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