One Hat Cyber Team
Your IP :
3.142.237.71
Server IP :
104.21.64.1
Server :
Linux agrigation-prod 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64
Server Software :
nginx/1.24.0
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
forge
/
gftag.com
/
app
/
Models
/
Edit File:
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', 'role_id', 'photo', 'email_token', 'password' ]; protected $hidden = [ 'password', ]; public function role() { return $this->belongsTo('App\Models\Role')->withDefault(function ($data) { foreach($data->getFillable() as $dt){ $data[$dt] = __('Deleted'); } }); } public function IsSuper(){ if ($this->id == 1) { return true; } return false; } public function sectionCheck($value){ $sections = json_decode($this->role->section,true); if (in_array($value, $sections)){ return true; }else{ return false; } } }
Simpan