ソースを参照

:art: fillable 调整到下面

visuddhinanda 1 年間 前
コミット
2abdfb7eab
1 ファイル変更4 行追加3 行削除
  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'
-        ];
 }