/** * Create a new query instance. * * @param \Luminous\Bridge\WP $wp * @param \Illuminate\Http\Request $request * @return void * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public function __construct(WP $wp, Request $request) { $this->wp = $wp; $this->request = $request; $this->postType = $this->wp->postType($this->route('post_type')); }
/** * Get the post type. * * @return \Luminous\Bridge\Post\Type */ protected function getPostTypeAttribute() { $postType = $this->original->object_type[0]; return WP::postType($postType); }