瀏覽代碼

Update models

Daniel Supernault 2 年之前
父節點
當前提交
7e333059fb
共有 11 個文件被更改,包括 20 次插入1 次删除
  1. 1 1
      app/Like.php
  2. 2 0
      app/Media.php
  3. 2 0
      app/MediaTag.php
  4. 2 0
      app/Mention.php
  5. 2 0
      app/Models/Conversation.php
  6. 1 0
      app/Models/Portfolio.php
  7. 2 0
      app/Models/UserPronoun.php
  8. 2 0
      app/Report.php
  9. 2 0
      app/ReportComment.php
  10. 2 0
      app/ReportLog.php
  11. 2 0
      app/StatusArchived.php

+ 1 - 1
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()
     {

+ 2 - 0
app/Media.php

@@ -19,6 +19,8 @@ class Media extends Model
      */
     protected $dates = ['deleted_at'];
 
+    protected $guarded = [];
+
     protected $casts = [
     	'srcset' => 'array'
     ];

+ 2 - 0
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);

+ 2 - 0
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');

+ 2 - 0
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'];
 }

+ 1 - 0
app/Models/Portfolio.php

@@ -11,6 +11,7 @@ class Portfolio extends Model
     use HasFactory;
 
     public $fillable = [
+        'profile_id',
         'active',
         'show_captions',
         'show_license',

+ 2 - 0
app/Models/UserPronoun.php

@@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
 class UserPronoun extends Model
 {
     use HasFactory;
+
+    protected $guarded = [];
 }

+ 2 - 0
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);

+ 2 - 0
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);

+ 2 - 0
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);

+ 2 - 0
app/StatusArchived.php

@@ -8,4 +8,6 @@ use Illuminate\Database\Eloquent\Model;
 class StatusArchived extends Model
 {
     use HasFactory;
+
+    protected $guarded = [];
 }