1
0
mirror of https://github.com/flarum/core.git synced 2025-10-17 17:56:14 +02:00

Clean up Eloquent definitions

This commit is contained in:
Toby Zerner
2018-07-21 17:06:42 +09:30
parent 87bba2186e
commit 0fb81958cb
12 changed files with 43 additions and 66 deletions

View File

@@ -59,11 +59,6 @@ class Discussion extends AbstractModel
use EventGeneratorTrait;
use ScopeVisibilityTrait;
/**
* {@inheritdoc}
*/
protected $table = 'discussions';
/**
* An array of posts that have been modified during this request.
*
@@ -72,12 +67,14 @@ class Discussion extends AbstractModel
protected $modifiedPosts = [];
/**
* {@inheritdoc}
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['created_at', 'last_posted_at', 'hidden_at'];
/**
* Casts properties to a specific type.
* The attributes that should be cast to native types.
*
* @var array
*/

View File

@@ -42,7 +42,9 @@ class UserState extends AbstractModel
protected $table = 'discussion_user';
/**
* {@inheritdoc}
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['last_read_at'];