mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-28 17:03:57 +00:00
Major incomplete Change
This commit is contained in:
+12
-8
@@ -2,15 +2,12 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
|
||||
class User extends Authenticatable
|
||||
class User extends AbstractUserModel
|
||||
{
|
||||
use Notifiable;
|
||||
// use LogsActivity;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
@@ -18,11 +15,9 @@ class User extends Authenticatable
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'first_name', 'last_name', 'email', 'password', 'verified',
|
||||
'first_name', 'last_name', 'email', 'password', 'verified', 'role'
|
||||
];
|
||||
|
||||
// protected static $logFillable = true;
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
@@ -31,4 +26,13 @@ class User extends Authenticatable
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function pendingEmailVerifications(): HasMany {
|
||||
return $this->hasMany(UserEmailVerification::class, 'email')
|
||||
->where('is_active', true)
|
||||
->where('is_complete', false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user