<?php

namespace App\Models;


use App\Traits\Searchable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;

class Admin extends Authenticatable
{

    use HasRoles;
    use Searchable;
    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password',
        'remember_token',
    ];


    public function scopeEmployee($query)
    {
        return $query->where('username', '!=', 'admin');
    }

    public function guardName(){
        return ['admin'];
    }
}
