language_name)) { $languageName = json_decode($this->language_name, 1); } return $languageName; } function getSlugAttribute() { return '/place/' . Str::slug($this->name, $separator = '-', $language = 'en') . '-' . $this->id; } //$propertyPlace['route'] = '/place/' . Str::slug($propertyPlace['name'], $separator = '-', $language = 'en') . '-' . $propertyPlace['id']; public function propertyPlaceCategory() { return $this->hasOne('App\Models\PropertyPlaceCategory','id', 'place_category_id') ->where('status', '=', 1) ->select("id", "name", "language_key", "parent_id", "level", "order_number","icon","status"); } public function propertyPlaceWorkingHour() { return $this->hasOne('App\Models\PropertyPlaceWorkingHour','id', 'place_working_hour_id') ->where('status', '=', 1) ->select("id", "name", "language_key", "status"); } public function propertyPlacePhotoMapping() { return $this->hasMany('App\Models\PropertyPlacePhotoMapping','place_id', 'id') ; } public function propertyPlaceFactMapping() { return $this->hasMany('App\Models\PropertyPlaceFactMapping','property_place_id', 'id') ; } public function propertyPlaceCategoryFieldValue() { return $this->hasMany('App\Models\PropertyPlaceCategoryFieldValue','place_id', 'id') ; } public function propertyWebPlaceMapping() { return $this->hasMany('App\Models\PropertyWebPlaceMapping', 'property_place_id', 'id')->select(['id', 'property_id', 'property_web_id', 'property_place_id']); } }