Files
E-Vote/app/Voter.php
T

32 lines
1.1 KiB
PHP

<?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laravel\Passport\HasApiTokens;
class Voter extends Authenticatable
{
use HasApiTokens;
protected $table = 'voter';
protected $fillable = ['name', 'no_kp', 'no_anggota','unit', 'election_id', 'alamat', 'telefon', 'saham', 'yuran', 'dividen_saham', 'dividen_yuran', 'saham_terkini', 'yuran_terkini', 'kehadiran','status_penyata','persetujuan','tarikh_sah','cadangan','pelaburan', 'dividen_pelaburan', 'pelaburan_terkini', 'pelaburan_2', 'dividen_pelaburan_2', 'pelaburan_terkini_2', 'accumulated_amount', 'tergempar','barangan','peribadi','berjamin_yuran','roadtax','pelbagai'];
protected $casts = [
'fizikal_registration_verified_at' => 'datetime',
];
/**
* Fizikal attendees must be counter-verified by admin; Maya does not use this gate.
*/
public function isFizikalRegistrationVerifiedForVoting(): bool
{
if ((int) $this->kehadiran !== 1) {
return true;
}
return $this->fizikal_registration_verified_at !== null;
}
}