Browse Source

add deleted_at in $dates

visuddhinanda 2 years ago
parent
commit
655d64f3c1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/Models/Sentence.php

+ 4 - 1
app/Models/Sentence.php

@@ -4,13 +4,15 @@ namespace App\Models;
 
 use Illuminate\Database\Eloquent\Factories\HasFactory;
 use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\SoftDeletes;
 
 class Sentence extends Model
 {
     use HasFactory;
+    use SoftDeletes;
 	protected $fillable = ['id','uid','book_id',
                           'paragraph','word_start','word_end',
-                          'channel_uid','editor_uid','content',
+                          'channel_uid','editor_uid','content','content_type',
                           'strlen','status','create_time','modify_time','language'];
     protected $primaryKey = 'uid';
     protected $casts = [
@@ -20,6 +22,7 @@ class Sentence extends Model
     protected $dates = [
         'created_at',
         'updated_at',
+        'deleted_at',
         'fork_at'
     ];