Routing
1 year 2 months ago #6886
by admin
'urlManager' => [
'enablePrettyUrl' => true,
...
Read more...
'enablePrettyUrl' => true,
...
Routing
With resource and controller classes ready, you can access the resources using the URL like http://localhost/index.php?r=user/create
, similar to what you can do with normal Web applications.
In practice, you usually want to enable pretty URLs and take advantage of HTTP verbs. For example, a request POST /users
would mean accessing the user/create
action. This can be done easily by configuring the urlManager
application component in the application configuration like the following:
Reply to admin
- Google AdSense
-
Рекламщик
- On-line
- Advertiser
-
#AdSense
Google AdSense разместил рекламу по теме:
- You are here:
-
Home
-
Форум
-
Фреймворки
-
Yii2 (en)
- Routing