Created
December 13, 2011 19:42
-
-
Save v9n/1473564 to your computer and use it in GitHub Desktop.
Get name of current URI in a request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Request::current()->uri is equal to $this->reqest->uri() in normal request or in first request of HMVC | |
| //echo $this->request->uri(), Request::current()->uri(); | |
| //echo Route::name($this->request->route()); exit; | |
| if (!$auth->logged_in() && (!in_array(Route::name($this->request->route()), $this->_requireAuthen) || Route::name(new Route(Request::current()->uri()))=='hash' ) ) { | |
| $this->request->redirect('account/login'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment