⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.31
Server IP:
95.217.99.93
Server:
Linux sv1.sonichosted.com 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
lifestylescentra
/
www
/
app
/
Models
/
View File Name :
Tool.php
<?php namespace App\Models; use App\Traits\UpdateGenericClass; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Tool extends Model { use HasFactory, UpdateGenericClass; protected $table = 'tools'; protected $fillable = [ 'status', 'created_by', 'updated_by', ]; public function createdBy() { return $this->belongsTo(Admin::class, 'created_by'); } public function updatedBy() { return $this->belongsTo(Admin::class, 'updated_by'); } public function translations() { return $this->hasMany(ToolTranslation::class, 'tool_id'); } public function translation() { return $this->hasOne(ToolTranslation::class, 'tool_id')->where('lang_code', getSessionLanguage()); } public function getTranslation($code) { return $this->hasOne(ToolTranslation::class)->where('lang_code', $code)->first(); } }