public function attachment() { return $this->hasMany('Corcel\\Post', 'post_parent')->where('post_type', 'attachment'); }