Răsfoiți Sursa

add primaryKey

visuddhinanda 2 ani în urmă
părinte
comite
fd126b8b74
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      app/Models/Attachment.php

+ 5 - 0
app/Models/Attachment.php

@@ -8,4 +8,9 @@ use Illuminate\Database\Eloquent\Model;
 class Attachment extends Model
 {
     use HasFactory;
+    protected $primaryKey = 'id';
+    protected $casts = [
+        'id' => 'string'
+    ];
+    public  $incrementing = true;
 }