mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08: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:
parent
a849bdaa50
commit
6c0f694354
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user