taklimat ulangan+profil

This commit is contained in:
Saufi
2026-07-04 14:45:16 +08:00
parent e803f55b80
commit 0c134b9038
24 changed files with 2375 additions and 34 deletions

View File

@@ -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.
*