Prechádzať zdrojové kódy

add deleted_at in $dates

visuddhinanda 2 rokov pred
rodič
commit
655d64f3c1
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  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\Factories\HasFactory;
 use Illuminate\Database\Eloquent\Model;
 use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\SoftDeletes;
 
 
 class Sentence extends Model
 class Sentence extends Model
 {
 {
     use HasFactory;
     use HasFactory;
+    use SoftDeletes;
 	protected $fillable = ['id','uid','book_id',
 	protected $fillable = ['id','uid','book_id',
                           'paragraph','word_start','word_end',
                           'paragraph','word_start','word_end',
-                          'channel_uid','editor_uid','content',
+                          'channel_uid','editor_uid','content','content_type',
                           'strlen','status','create_time','modify_time','language'];
                           'strlen','status','create_time','modify_time','language'];
     protected $primaryKey = 'uid';
     protected $primaryKey = 'uid';
     protected $casts = [
     protected $casts = [
@@ -20,6 +22,7 @@ class Sentence extends Model
     protected $dates = [
     protected $dates = [
         'created_at',
         'created_at',
         'updated_at',
         'updated_at',
+        'deleted_at',
         'fork_at'
         'fork_at'
     ];
     ];