where('public',TRUE); } /* RELATIONS */ public function echoareas() { return $this->hasMany(Echoarea::class); } public function fileareas() { return $this->hasMany(Filearea::class); } public function zones() { return $this->hasMany(Zone::class); } /* CASTS */ public function getHomePageAttribute($value) { return $value ? gzuncompress(base64_decode($value)) : 'No available information at the moment.'; } public function setHomePageAttribute($value) { $this->attributes['homepage'] = base64_encode(gzcompress($value,9)); } }