Meta information and article body cast
This commit is contained in:
@@ -32,6 +32,17 @@ class Article extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'body' => 'array',
|
||||
'meta' => 'array'
|
||||
];
|
||||
|
||||
public function source()
|
||||
{
|
||||
return $this->belongsTo(Source::class);
|
||||
|
||||
Reference in New Issue
Block a user