Standardise models
This commit is contained in:
+14
-14
@@ -24,20 +24,6 @@ class Action extends Model
|
||||
{
|
||||
use ValidatingTrait;
|
||||
|
||||
/**
|
||||
* A list of methods protected from mass assignment.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $guarded = ['_token', '_method'];
|
||||
|
||||
/**
|
||||
* The relations to eager load on every query.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $with = ['user'];
|
||||
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
@@ -52,6 +38,13 @@ class Action extends Model
|
||||
'description' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of methods protected from mass assignment.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $guarded = ['_token', '_method'];
|
||||
|
||||
/**
|
||||
* The validation rules.
|
||||
*
|
||||
@@ -66,6 +59,13 @@ class Action extends Model
|
||||
'description' => 'required|string',
|
||||
];
|
||||
|
||||
/**
|
||||
* The relations to eager load on every query.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $with = ['user'];
|
||||
|
||||
/**
|
||||
* Get the user relation.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user