uawdijnntqw1x1x1
IP : 216.73.216.93
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
admin.eclassify.codeskitter.site
/
app
/
Models
/
Tip.php
/
/
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class Tip extends Model { use HasFactory, SoftDeletes; protected $fillable = [ 'description' ]; protected $appends = ['translated_name']; public function translations() { return $this->hasMany(TipTranslation::class); } public function scopeSearch($query, $search) { $search = "%" . $search . "%"; return $query->where(function ($q) use ($search) { $q->orWhere('description', 'LIKE', $search) ->orWhereHas('translations', function ($q) use ($search) { $q->where('description', 'LIKE', $search); }); }); } public function getTranslatedNameAttribute() { $languageCode = request()->header('Content-Language'); if (!empty($languageCode) && $this->relationLoaded('translations')) { // NOTE : This code can be done in Cache $language = Language::select(['id', 'code'])->where('code', $languageCode)->first(); if (empty($language)) { return $this->description; } $translation = $this->translations->first(static function ($data) use ($language) { return $data->language_id == $language->id; }); return $translation->description ?? $this->description; } return $this->description; } }
/home/users/unlimited/www/admin.eclassify.codeskitter.site/app/Models/Tip.php