mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 07:38:01 +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
9e81e9f955
commit
23caaf668a
|
@ -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