浏览代码

: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'
-        ];
 }