Created
June 11, 2016 13:43
-
-
Save subhanahmed047/833f27216e086add254a28dfbf4e11ad to your computer and use it in GitHub Desktop.
Routes for my users plugin
This file contains 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
Router::prefix('admin', function ($routes) { | |
$routes->plugin( | |
'IncUsers', | |
['path' => '/users'], | |
function (RouteBuilder $routes) { | |
$routes->fallbacks('DashedRoute'); | |
$routes->connect('/login/', ['controller' => 'Users', 'action' => 'login']); | |
$routes->connect('/register/', ['controller' => 'Users', 'action' => 'add']); | |
$routes->connect('/logout/', ['controller' => 'Users', 'action' => 'logout']); | |
$routes->connect('/profile/:id', ['controller' => 'Users', 'action' => 'view'], | |
['id' => '\d+', 'pass' => ['id']]); | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment