⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.138
Server IP:
186.226.58.36
Server:
Linux da02.sh15.net 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Server Software:
Apache/2
PHP Version:
8.1.32
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
redesystem
/
public_html
/
sys
/
app
/
Models
/
Edit File: User.php
'English', 'es' => 'Spanish', 'fr' => 'French', 'de' => 'German', 'ru' => 'Russian', 'pt' => 'Portuguese', 'ar' => 'Arabic', 'zh' => 'Chinese', 'tr' => 'Turkish', ]; const LANGUAGES_IMAGE = [ 'en' => 'web/media/flags/united-states.svg', 'es' => 'web/media/flags/spain.svg', 'fr' => 'web/media/flags/france.svg', 'de' => 'web/media/flags/germany.svg', 'ru' => 'web/media/flags/russia.svg', 'pt' => 'web/media/flags/portugal.svg', 'ar' => 'web/media/flags/iraq.svg', 'zh' => 'web/media/flags/china.svg', 'tr' => 'web/media/flags/turkey.svg', ]; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'first_name', 'last_name', 'email', 'contact', 'region_code', 'status', 'password', 'language', 'dark_mode', 'is_default_admin', ]; protected $appends = ['full_name', 'profile_image']; /** * The attributes that should be hidden for arrays. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; public static $rules = [ 'first_name' => 'required', 'last_name' => 'required', 'email' => 'required|email:filter|unique:users,email', 'password' => 'required|same:password_confirmation|min:6', ]; /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ 'first_name' => 'string', 'last_name' => 'string', 'email' => 'string', 'contact' => 'string', 'region_code' => 'string', 'status' => 'integer', 'language' => 'string', 'dark_mode' => 'integer', 'email_verified_at' => 'datetime', 'password' => 'string', 'remember_token' => 'string', 'is_default_admin' => 'integer', ]; public function getProfileImageAttribute(): string { /** @var Media $media */ $media = $this->getMedia(self::PROFILE)->first(); if (! empty($media)) { return $media->getFullUrl(); } return asset('assets/images/avatar.png'); } public function getRoleNameAttribute() { $role = $this->roles()->first(); if (! empty($role)) { return $role->display_name; } } public function getFullNameAttribute(): string { return $this->first_name.' '.$this->last_name; } public function client(): HasOne { return $this->hasOne(Client::class, 'user_id'); } }
Simpan