Exemplo n.º 1
0
 public function route($args)
 {
     parent::route($args);
     $id = $this->request->post('zineId');
     $success = $this->zineService->createZineIssue($id, $this->request->post());
     if ($success) {
         $this->app->redirect("/admin/zine/" . $id);
     }
 }
Exemplo n.º 2
0
 public function route($args)
 {
     parent::route($args);
     $msg = $this->userService->processLoginForm($this->request->post());
     if ($msg === false) {
         $this->app->flash('error', 'incorrect username or password');
     }
     $this->app->redirect("/admin");
 }
Exemplo n.º 3
0
 public function route($args)
 {
     parent::route($args);
     $result = $this->articleService->createArticle($this->request->post());
     if ($result === true) {
         $this->app->redirect("/admin/article");
     } else {
         $this->app->flash('error', 'Cannot create article');
         $this->app->flash('article', $result);
         $this->app->redirect("/admin/article");
     }
 }
Exemplo n.º 4
0
 public function route($args)
 {
     parent::route($args);
     $this->userService->processLogoutForm();
     $this->app->redirect($this->request->getRootUri());
 }