mirror of
https://gitlab.com/omair-personal/izyim.git
synced 2026-08-19 20:34:09 +00:00
39 lines
813 B
PHP
39 lines
813 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
class User extends AbstractUserModel
|
|
{
|
|
use Notifiable;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'first_name', 'last_name', 'email', 'password', 'verified', 'role_id'
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for arrays.
|
|
*
|
|
* @var array
|
|
*/
|
|
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);
|
|
}
|
|
}
|