function preDispatch()
 {
     parent::preDispatch();
     $jsonRenderer = new \Zrecommerce\Storefront\App\View\Renderer\Json();
     $this->setLayout('');
     // No layout is used.
     $this->setRenderer($jsonRenderer);
 }
 public function preDispatch()
 {
     parent::preDispatch();
     // Require an authenticated session.
     if (!\Zrecommerce\Storefront\Auth::isAuthenticated()) {
         $this->redirect($this->_signin_url);
     }
 }
 function preDispatch()
 {
     parent::preDispatch();
     $jsonRenderer = new \App\View\Renderer\Json();
     $this->setLayout('');
     // No layout is used.
     $this->setRenderer($jsonRenderer);
     // Require an authenticated session.
     if (!\Auth::isAuthenticated()) {
         header('HTTP/1.1 401 Authorization Required');
         exit;
     }
 }