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();
 }
예제 #2
0
 protected function initialize()
 {
     parent::initialize();
     $this->session->reflashPreviousUrl();
 }