![]() _scheme Set to create links on different schemes like webcal or _ext Used for Routing File Extensions routing. You can also use any of the special route elements when generating URLs: $routes -> url (, '#' => 'top' ]) // Will generate a URL like. These methods replace many of the keys in the $options parameter AfterĬonnecting a route you can use its fluent builder methods to further configure There are a number of route options that can be set on each route. If you have setup named routes, you can use this key _method Define the HTTP verb/method to use. _https Set to true to convert the generated URL to https or false General Configuration will be prepended to generated URLs. _full If true the value of App.fullBaseUrl mentioned in _port Set the port if you need to create links on non-standard ports. _scheme Set to create links on different schemes like webcal or ftp. Your application is not in the root directory, this can be used to generate ![]() _base Set to false to remove the base path from the generated URL. Plugin Used to name the plugin a controller is located in. There are several route elements that have special meaning inĬakePHP, and should not be used unless you want the special meaningĬontroller Used to name the controller for a route.Īction Used to name the controller action for a route. Parameters in $this->request->getParam(). The index() actions of their respective controllers, with the date ![]() Once defined, this route will match /articles/1, ![]() You can still specifyĪlternates, as above, but not grouped with parenthesis. Note that parenthesis (capturing groups)Īre not supported in the regular expressions. Regardless of the controller,įinally, we specify some regular expressions that will match years, The first is familiar to us: it’s a default routeĮlement that tells CakePHP to expect a controller name. This is rather involved, but shows how powerful routes can be.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |