*/ protected $fillable = [ 'title', 'slug', 'publish_at', 'content', 'user_id', 'hero' ]; /** * Get the post user * * @return BelongsTo */ public function user() { return $this->belongsTo(User::class); } /** * Get all of the post's attachments. */ public function attachments() { return $this->morphMany('App\Attachment', 'attachable'); } }