2
0
Эх сурвалжийг харах

protected $primaryKey = 'uid';

visuddhinanda 2 жил өмнө
parent
commit
2f319f3022

+ 9 - 1
app/Models/Sentence.php

@@ -8,5 +8,13 @@ use Illuminate\Database\Eloquent\Model;
 class Sentence extends Model
 {
     use HasFactory;
-	protected $fillable = ['id','uid','book_id','paragraph','word_start','word_end','channel_uid','editor_uid','content','strlen','status','create_time','modify_time','language'];
+	protected $fillable = ['id','uid','book_id',
+                          'paragraph','word_start','word_end',
+                          'channel_uid','editor_uid','content',
+                          'strlen','status','create_time','modify_time','language'];
+    protected $primaryKey = 'uid';
+    protected $casts = [
+        'uid' => 'string'
+    ];
+
 }