hasMany('App\Models\PostImgs', 'post_id', 'id'); } public function data() { return $this->hasOne('App\Models\PostData', 'post_id', 'id'); } // public function topic() // { // return Topic::whereIn('id', explode(',', $this->topic_ids))->pluck('name', 'id'); // } }