• File: Admin.php
  • Full Path: /home/masbinta/public_html/core/app/Models/Admin.php
  • File size: 622 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace App\Models;

use App\Models\Role;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Foundation\Auth\User as Authenticatable;

class Admin extends Authenticatable
{
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'role_id', 'name', 'username', 'email', 'password', 'image', 'status'
    ];


    public function role() : BelongsTo
    {
      return $this->belongsTo(Role::class, 'role_id');
    }

}