taklimat ulangan+profil
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use App\Models\Sppm\Dun;
|
||||
use App\Notifications\ResetKataLaluanNotification;
|
||||
use Database\Factories\UserFactory;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Attributes\Hidden;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
@@ -27,6 +30,24 @@ class User extends Authenticatable
|
||||
return $this->role === 'pengurus';
|
||||
}
|
||||
|
||||
public function isKaunter(): bool
|
||||
{
|
||||
return $this->role === 'kaunter';
|
||||
}
|
||||
|
||||
public function dun(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Dun::class, 'dun_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Guna e-mel dalam Bahasa Melayu untuk pautan set semula kata laluan.
|
||||
*/
|
||||
public function sendPasswordResetNotification(#[\SensitiveParameter] $token): void
|
||||
{
|
||||
$this->notify(new ResetKataLaluanNotification($token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user