protected function initialize() { $user = $this->session->user(); if (!$user) { throw new HttpException(403, 'Access denied.', "No user is logged-in.<p><br>Did you forget to setup an authentication middleware?"); } parent::initialize(); }
protected function initialize() { parent::initialize(); $this->session->reflashPreviousUrl(); }