コード例 #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);
     }
 }
コード例 #2
0
ファイル: LoginFormController.php プロジェクト: jhnbrnn/Sloop
 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");
 }
コード例 #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");
     }
 }
コード例 #4
0
 public function route($args)
 {
     parent::route($args);
     $this->userService->processLogoutForm();
     $this->app->redirect($this->request->getRootUri());
 }