芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/app/Models/User.php
*/ protected $fillable = [ 'id', 'name', 'email', 'password', 'about', ]; protected $appends = ['role_name', 'role_title']; /** * The attributes that should be hidden for serialization. * * @var array
*/ protected $hidden = [ 'password', 'remember_token', ]; /** * The attributes that should be cast. * * @var array
*/ protected $casts = [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; /** * Get users role name */ public function getRoleNameAttribute(): mixed { return $this->roles->first()?->name; } /** * Get users role title */ public function getRoleTitleAttribute(): mixed { return $this->roles->first()?->title; } }