Ken 1 月之前
父节点
当前提交
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');