We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config/web.php
Create the config/routes.php file and add the code below:
config/routes.php
<?php return [ // To create a standalone route // 'pattern/to/your/route' => 'controller-id/action-id' // To create a standalone route with more configurations /*[ 'pattern' => 'pattern/to/your/route', 'route' => 'controller-id/action-id', 'verb' => ['GET'] ]*/ // To create a Active route (Active Controller) /*[ 'class' => 'yii\rest\UrlRule', 'controller' => 'controller-id', //'pluralize' => true, 'extraPatterns' => [ 'GET test' => 'test', ], ]*/ ];
In the top of the config/web.php, insert the
$routes = require __DIR__ . '/routes.php';
In the urlManager config, setup the rules property to a variable created above:
urlManager
rules
'urlManager' => [ 'enablePrettyUrl' => true, 'enableStrictParsing' => true, 'showScriptName' => false, 'rules' => $routes, ]
The text was updated successfully, but these errors were encountered:
issue #4
28cd33e
No branches or pull requests
Create the
config/routes.php
file and add the code below:In the top of the
config/web.php
, insert theIn the
urlManager
config, setup therules
property to a variable created above:The text was updated successfully, but these errors were encountered: