<?php

namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class Admin extends Authenticatable
{
    use Notifiable;

    protected $table = 'admins';   

    protected $primaryKey = 'id_admin';

    public $incrementing = true;

    protected $keyType = 'string';

    protected $fillable = [
        'username',
        'password',
        'foto_profil'
    ];

    protected $hidden = [
        'password',
    ];


    public function getAuthIdentifierName()
    {
        return 'id_admin';
    }

    public function getAuthIdentifier()
    {
        return $this->getKey();
    }
}
