I am working on Kohana PHP framework.
I want to show a 'username' instead of controller name in my URL.
For example,
username = james then how to show
instead of
http://localhost:3000/scrapbook/index => ... localhost:3000/scrapbook
(controller: scrapbook, action: index)
in the url.
My bootstrap file have the entry for such types of url. If I manually write ..//localhost:3000/james, it takes me to the requested page.
//Viewing a user's profile or account details - user/action
Route::set('profile', '(<username>(/<action>(/<id>)))',
array(
'username' => '([A-Za-z0-9\-]+)'))
->defaults(array(
'controller' => 'scrapbook',
'action' => 'index'));
What I want is if I manually signin and go to scrapbook, my url should show 'username' and not the name of the controller. I will appreciate if anyone can guide me in this. Thanks