Bläddra i källkod

:art: fillable 调整到下面

visuddhinanda 1 år sedan
förälder
incheckning
2abdfb7eab
1 ändrade filer med 4 tillägg och 3 borttagningar
  1. 4 3
      api-v8/app/Models/Like.php

+ 4 - 3
api-v8/app/Models/Like.php

@@ -8,8 +8,9 @@ use Illuminate\Database\Eloquent\Model;
 class Like extends Model
 {
     use HasFactory;
+    protected $primaryKey = 'id';
+	protected $casts = [
+		'id' => 'string'
+	];
     protected $fillable = ['type' , 'target_id', 'target_type','user_id','context'];
-    protected $casts = [
-            'id' => 'string'
-        ];
 }