Explorar el Código

add primaryKey

visuddhinanda hace 2 años
padre
commit
fd126b8b74
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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;
 }