Skip to content

Instantly share code, notes, and snippets.

@alanwillms
Created April 10, 2017 19:07
Show Gist options
  • Save alanwillms/1dfde8a68bbd8f36e7df10265e9f46a9 to your computer and use it in GitHub Desktop.
Save alanwillms/1dfde8a68bbd8f36e7df10265e9f46a9 to your computer and use it in GitHub Desktop.
URLs
<?php
return [
'urlManager' => [
// URLs limpas = 'enablePrettyUrl' => true,
// URLs sem o index.php = 'showScriptName' => false,
'rules' => [
// Regras específicas
'api/v2/clientes/<id_cliente>/historicos' => 'api/v2/historicos/index',
// Regra geral:
'api/v2/<controller:\w+>/<action:\w+>' => 'api/v2/<controller>/<action>',
]
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment