MIF_E31230356/app/Models/Admin.php

40 lines
635 B
PHP

<?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'
];
protected $hidden = [
'password',
];
public function getAuthIdentifierName()
{
return 'id_admin';
}
public function getAuthIdentifier()
{
return $this->getKey();
}
}