FuelPHP Bin
class Controller_Base extends \Controller_Hybrid { public $is_logged = false; public function before() { if($this->is_logged = \Auth::check()): echo 'Logged'; else: echo 'Not Logged'; endif; } /** * After controller method has run output the template * * @param Response $response */ public function after($response) { if ( ! \Input::is_ajax() || \Request::is_hmvc()): // If nothing was returned set the theme instance as the response if (empty($response)) { $response = \Response::forge(\Theme::instance()); } if ( ! $response instanceof \Response) { $response = \Response::forge($response); } return $response; endif; return parent::after($response); } }