*/ protected $fillable = [ 'id_teknisi', 'username', 'password', 'password_plain', 'status', ]; /** * Atribut yang harus disembunyikan (hidden) dari array atau JSON. * * @var array */ protected $hidden = [ 'password', ]; /** * Atribut yang harus dikonversi ke tipe data tertentu. * * @var array */ protected $casts = [ 'password' => 'hashed', ]; /** * Relasi ke model Teknisi. * Sebuah AkunTeknisi dimiliki oleh satu Teknisi. * * @return BelongsTo */ public function teknisi(): BelongsTo { return $this->belongsTo(Teknisi::class, 'id_teknisi', 'id_teknisi'); } /** * Get the identifier that will be stored in the subject claim of the JWT. * * @return mixed */ public function getJWTIdentifier() { return $this->getKey(); } /** * Return a key value array, containing any custom claims to be added to the JWT. * * @return array */ public function getJWTCustomClaims() { return []; } }