belongsTo('Api\Users\Models\User'); } public function post_type() { return $this->belongsTo('Api\Posts\Models\Post'); } public function media_post() { return $this->hasOne('Api\Posts\Models\MediaPost'); } public function text_post() { return $this->hasOne('Api\Posts\Models\TextPost'); } }