Hi I had faced problem in url writing just like in cake php, In cake php I can use routes for different url
such if post/create, than i can write in in cake php as create/post so look which url is the best
post/create
or create/post ( in cake php)
I had searched all over the internet but i didn't get it. If this features was not in Yii than please add this type url writing in yii next version .Thank you
Page 1 of 1
Url Writing Just Like Cake Php
#2
Posted 25 November 2012 - 07:08 AM
nirmalroka, on 25 November 2012 - 06:27 AM, said:
Hi I had faced problem in url writing just like in cake php, In cake php I can use routes for different url
such if post/create, than i can write in in cake php as create/post so look which url is the best
post/create
or create/post ( in cake php)
I had searched all over the internet but i didn't get it. If this features was not in Yii than please add this type url writing in yii next version .Thank you
such if post/create, than i can write in in cake php as create/post so look which url is the best
post/create
or create/post ( in cake php)
I had searched all over the internet but i didn't get it. If this features was not in Yii than please add this type url writing in yii next version .Thank you
In a company where I'm working we're doing things with cakephp (2.x). I haven't seen this kind of routes, though. When following conventions you always stays with controller/action. But to achieve what you want with yii, you can write default routes in config/main.php like this:
array(
'<action:\w+>/<controller:\w+>'=>'<controller>/<action>',
'<controller:\w+>'=>'<controller>',
)
By the way, routing system in yii is very well thought and you can achieve almost everything, if not everything, with it.
Cheerio
Share this topic:
Page 1 of 1

Help












