diff --git a/app/Like.php b/app/Like.php index 678ce953f..00af1030a 100644 --- a/app/Like.php +++ b/app/Like.php @@ -17,7 +17,7 @@ class Like extends Model * @var array */ protected $dates = ['deleted_at']; - protected $fillable = ['profile_id', 'status_id']; + protected $fillable = ['profile_id', 'status_id', 'status_profile_id']; public function actor() { diff --git a/app/Media.php b/app/Media.php index 6a25a5643..3e9afe1ed 100644 --- a/app/Media.php +++ b/app/Media.php @@ -19,6 +19,8 @@ class Media extends Model */ protected $dates = ['deleted_at']; + protected $guarded = []; + protected $casts = [ 'srcset' => 'array' ]; diff --git a/app/MediaTag.php b/app/MediaTag.php index ff5fe9b6e..49dd52b16 100644 --- a/app/MediaTag.php +++ b/app/MediaTag.php @@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model; class MediaTag extends Model { + protected $guarded = []; + public function status() { return $this->belongsTo(Status::class); diff --git a/app/Mention.php b/app/Mention.php index 25c91ff11..d39399fcb 100644 --- a/app/Mention.php +++ b/app/Mention.php @@ -16,6 +16,8 @@ class Mention extends Model */ protected $dates = ['deleted_at']; + protected $guarded = []; + public function profile() { return $this->belongsTo(Profile::class, 'profile_id', 'id'); diff --git a/app/Models/Conversation.php b/app/Models/Conversation.php index 4f541a097..5b06c1c01 100644 --- a/app/Models/Conversation.php +++ b/app/Models/Conversation.php @@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model; class Conversation extends Model { use HasFactory; + + protected $fillable = ['from_id', 'to_id']; } diff --git a/app/Models/Portfolio.php b/app/Models/Portfolio.php index 758e8db49..56f3afd88 100644 --- a/app/Models/Portfolio.php +++ b/app/Models/Portfolio.php @@ -11,6 +11,7 @@ class Portfolio extends Model use HasFactory; public $fillable = [ + 'profile_id', 'active', 'show_captions', 'show_license', diff --git a/app/Models/UserPronoun.php b/app/Models/UserPronoun.php index 9fbf77d79..9fe7bb5b0 100644 --- a/app/Models/UserPronoun.php +++ b/app/Models/UserPronoun.php @@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model; class UserPronoun extends Model { use HasFactory; + + protected $guarded = []; } diff --git a/app/Report.php b/app/Report.php index 0aadc4616..bafde0b4d 100644 --- a/app/Report.php +++ b/app/Report.php @@ -8,6 +8,8 @@ class Report extends Model { protected $dates = ['admin_seen']; + protected $guarded = []; + public function url() { return url('/i/admin/reports/show/'.$this->id); diff --git a/app/ReportComment.php b/app/ReportComment.php index 1e57c49ce..070a7117c 100644 --- a/app/ReportComment.php +++ b/app/ReportComment.php @@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model; class ReportComment extends Model { + protected $guarded = []; + public function profile() { return $this->belongsTo(Profile::class); diff --git a/app/ReportLog.php b/app/ReportLog.php index eaa842e97..18080da6d 100644 --- a/app/ReportLog.php +++ b/app/ReportLog.php @@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model; class ReportLog extends Model { + protected $guarded = []; + public function profile() { return $this->belongsTo(Profile::class); diff --git a/app/StatusArchived.php b/app/StatusArchived.php index 862dddc69..a56a09cbd 100644 --- a/app/StatusArchived.php +++ b/app/StatusArchived.php @@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model; class StatusArchived extends Model { use HasFactory; + + protected $guarded = []; }