Ken 1 месяц назад
Родитель
Сommit
ed0d866efc
1 измененных файлов с 8 добавлено и 2 удалено
  1. 8 2
      app/Models/BaseModel.php

+ 8 - 2
app/Models/BaseModel.php

@@ -4,7 +4,8 @@
 
 use Carbon\Carbon;
 use Illuminate\Database\Eloquent\Builder;
-use Illuminate\Database\Eloquent\Model;
+use Illuminate\Foundation\Auth\User as Authenticatable;
+use Illuminate\Notifications\Notifiable;
 
 
 /**
@@ -15,8 +16,13 @@
  * @method static Builder|static insert($array)
  *
  */
-class BaseModel extends Model
+class BaseModel extends Authenticatable
 {
+    use  Notifiable;
+    protected $table = '';
+    protected $hidden = ['created_at', 'updated_at'];
+    protected $fillable = [];
+
     protected function getCreatedAtAttribute($value): string
     {
         return Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');