Your ROOT_URL in app.ini is http://167.99.32.63:3000/ but you are visiting http://167.99.32.63/ibrahim/BAGETWEBPANEL/blame/branch/master/app/Models/Admin.php You should set ROOT_URL correctly, otherwise the web may not work correctly.

30 lines
613 B

2 years ago
<?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class Admin extends Authenticatable
{
use Notifiable;
public function role(){
return $this->belongsTo(AdminRole::class,'role_id');
}
public function scopeZone($query)
{
if(isset(auth('admin')->user()->zone_id))
{
return $query->where('zone_id', auth('admin')->user()->zone_id);
}
return $query;
}
public function userinfo()
{
return $this->hasOne(UserInfo::class,'admin_id', 'id');
}
}