فهرست منبع

add primaryKey

visuddhinanda 2 سال پیش
والد
کامیت
fd126b8b74
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  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;
 }