public function __construct()
{
// Add location hinting for views
View::addLocation(app_path() . '/components/posts/views');
View::addNamespace('posts', app_path() . '/components/posts/views');
if (Request::is('pages*')) {
$this->type = 'page';
} else {
$this->type = 'post';
}
parent::__construct();
}