Browse Source

add primaryKey

visuddhinanda 1 year ago
parent
commit
a2653bc119
1 changed files with 4 additions and 0 deletions
  1. 4 0
      app/Models/TagMap.php

+ 4 - 0
app/Models/TagMap.php

@@ -7,7 +7,11 @@ use Illuminate\Database\Eloquent\Model;
 
 
 class TagMap extends Model
 class TagMap extends Model
 {
 {
+    protected $primaryKey = 'id';
     protected $keyType = 'string';
     protected $keyType = 'string';
+    protected $casts = [
+        'id' => 'string'
+    ];
 	protected $fillable = ['table_name' , 'anchor_id', 'tag_id'];
 	protected $fillable = ['table_name' , 'anchor_id', 'tag_id'];
     use HasFactory;
     use HasFactory;