Example #1
0
 public function before()
 {
     parent::before();
     if (empty(\Session::get(self::SESSION_KEY_USER_ID))) {
         return Response::redirect('mtpizza/auth');
     }
 }
Example #2
0
 public function before()
 {
     parent::before();
     if (empty(\Session::get(self::SESSION_KEY_USER_ID))) {
         return Response::redirect('mtpizza/auth/index/true');
     }
     if (empty(\Session::get(self::SESSION_KEY_CART))) {
         return Response::redirect('mtpizza/message/cartempty');
     }
 }
Example #3
0
 public function after($response)
 {
     global $data;
     $this->template->content = View::forge('website/content/message', $data);
     $response = parent::after($response);
     // あなた自身のレスポンスオブジェクトを作成する場合は必要ありません。
     // do stuff
     return $response;
     // after() は確実に Response オブジェクトを返すように
 }