From abfe156d8d18483f265a264c9769063cbfde8ba2 Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Mon, 10 Aug 2020 09:07:24 +0800 Subject: [PATCH] Change File model to use fillable as opposed to guardable attributes --- modules/system/models/File.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/system/models/File.php b/modules/system/models/File.php index ffca84afb..4bc33ae74 100644 --- a/modules/system/models/File.php +++ b/modules/system/models/File.php @@ -20,6 +20,26 @@ class File extends FileBase */ protected $table = 'system_files'; + /** + * @var array The attributes that are mass assignable. + */ + protected $fillable = [ + 'file_name', + 'title', + 'description', + 'field', + 'attachment_id', + 'attachment_type', + 'is_public', + 'sort_order', + 'data', + ]; + + /** + * @var array The attributes that aren't mass assignable. + */ + protected $guarded = []; + /** * {@inheritDoc} */