芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/lavishbdlifestyle.com/app/Models/Attribute.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use App\Traits\PreventDemoModeChanges; use App; class Attribute extends Model { use PreventDemoModeChanges; protected $with = ['attribute_translations']; public function getTranslation($field = '', $lang = false){ $lang = $lang == false ? App::getLocale() : $lang; $attribute_translation = $this->attribute_translations->where('lang', $lang)->first(); return $attribute_translation != null ? $attribute_translation->$field : $this->$field; } public function attribute_translations(){ return $this->hasMany(AttributeTranslation::class); } public function attribute_values() { return $this->hasMany(AttributeValue::class); } }
Page is not found
Oops! Page not found.
Sorry, an error has occured, Requested page not found!
Back To Homepage