Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/Modules/PrivacyPolicy/app/Models/PrivacyPolicy.php
Назад
<?php namespace Modules\PrivacyPolicy\app\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Factories\HasFactory; use Modules\PrivacyPolicy\app\Models\PrivacyPolicyTranslation; use Modules\PrivacyPolicy\Database\factories\PrivacyPolicyFactory; class PrivacyPolicy extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = []; protected static function newFactory(): PrivacyPolicyFactory { //return PrivacyPolicyFactory::new(); } public function getTranslation($code): ?PrivacyPolicyTranslation { return $this->hasOne(PrivacyPolicyTranslation::class)->where('lang_code', $code)->first(); } public function translations(): ?HasMany { return $this->hasMany(PrivacyPolicyTranslation::class, 'privacy_policy_id'); } public function translation(): ?HasOne { return $this->hasOne(PrivacyPolicyTranslation::class, 'privacy_policy_id')->where('lang_code', getSessionLanguage()); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.20 | Генерация страницы: 0.1 |
proxy
|
phpinfo
|
Настройка