Ken 1 viikko sitten
vanhempi
commit
f448a43c6b
1 muutettua tiedostoa jossa 1 lisäystä ja 24 poistoa
  1. 1 24
      app/Models/Chat.php

+ 1 - 24
app/Models/Chat.php

@@ -2,31 +2,8 @@
 
 namespace App\Models;
 
-use Illuminate\Database\Eloquent\Builder;
-use Illuminate\Foundation\Auth\User as Authenticatable;
-use Illuminate\Notifications\Notifiable;
-use Laravel\Sanctum\HasApiTokens;
-
-/**
- * @mixin Builder
- * @method static Builder|static where($column, $operator = null, $value = null, $boolean = 'and')
- */
-class Chat extends Authenticatable
+class Chat extends BaseModel
 {
-    use HasApiTokens, Notifiable;
-
     protected $table = 'chats';
-    protected $hidden = ['created_at', 'updated_at'];
     protected $fillable = ['title', 'chat_id'];
-
-
-    protected function getCreatedAtAttribute($value)
-    {
-        return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
-    }
-
-    protected function getUpdatedAtAttribute($value)
-    {
-        return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
-    }
 }