Answer the question
In order to leave comments, you need to log in
How to make personal user pages in kohana?
Tell me how to write personal accounts of users on kohana so that the addresses of their pages are implemented like Vkontakte. More precisely, each user had an id and with the help of it one could go to the page of any user.
Answer the question
In order to leave comments, you need to log in
Have you read ?
As far as I understand, looking diagonally in Bootstrap, you need to write something like:
Route::set('users', '(users(/<id>))')
->defaults(array(
'controller' => 'users,
'action' => 'personalPage',
));
is that, it turns out for each user you need to create a controller, the name of which will be Id?
Something like this:
Controller:
class Controller_Index_Account extends Controller_Index
{
public function action_index()
{
$user_id = $this->request->param('id');
...
}
}
Route::set('index_account', 'id(/<id>)', ['action' => '(index)',])->
defaults([
'directory' => 'index',
'controller' => 'account',
'action' => 'index',
]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question