hasOne(PageMeta::class, 'page_id'); } /** * */ public function posts() { return $this->hasMany(Post::class); } /** * */ public function getFullImageAttribute() { $result = null; if($this->image_path) { $result = asset('storage/uploads/' . $this->image_path); } return $result; } }