⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.52
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
/
public_html
/
app
/
Models
/
View File Name :
HomePageSlider.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; class HomePageSlider extends Model { use HasFactory; protected $table = 'home_page_sliders'; protected $fillable = [ 'image', 'status', 'button_text', 'button_icon', 'button_link', 'home_page', 'order' ]; public function translations(): ?HasMany { return $this->hasMany(HomePageSliderTranslation::class, 'home_page_slider_id'); } public function translation(): ?HasOne { return $this->hasOne(HomePageSliderTranslation::class)->where('lang_code', getSessionLanguage()); } public function getTranslation($code): ?HomePageSliderTranslation { return $this->hasOne(HomePageSliderTranslation::class)->where('lang_code', $code)->first(); } public function getTitleAttribute(): ?string { return $this->translation?->title; } public function getSubtitle1Attribute(): ?string { return $this->translation?->subtitle_1; } public function getSubtitle2Attribute(): ?string { return $this->translation?->subtitle_2; } public function getButtonTextAttribute(): ?string { return $this->translation?->button_text; } }