One Hat Cyber Team
Your IP:
216.73.216.58
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
home
/
fluxyjvi
/
public_html
/
project
/
app
/
Models
/
View File Name :
Admin.php
<?php namespace App\Models; use Illuminate\Foundation\Auth\User as Authenticatable; class Admin extends Authenticatable { protected $guard = 'admin'; protected $fillable = [ 'name', 'email', 'phone', 'password', 'role_id', 'photo', 'created_at', 'updated_at', 'remember_token' ]; protected $hidden = [ 'password', 'remember_token', ]; public function IsSuper(){ if ($this->id == 1) { return true; } return false; } public function staff_role(){ return $this->belongsTo('App\Models\Role','role_id')->withDefault(); } public function role() { return $this->belongsTo('App\Models\Role')->withDefault(function ($data) { foreach($data->getFillable() as $dt){ $data[$dt] = __('Deleted'); } }); } public function sectionCheck($value){ $sections = explode(" , ", $this->role->section); if (in_array($value, $sections)){ return true; }else{ return false; } } }