Open orlandovillarreal opened 8 years ago
The important part in that code is this:
'controllerMap' => [
'default' => 'app\controllers\MyDefaultController',
],
So you basically need to create a file like app\controllers\MyDefaultController.php
and point the module to it. And that file would look like this:
<?php
namespace app\controllers;
use Yii;
class MyDefaultController extends \amnah\yii2\user\controllers\DefaultController
{
}
(Feel free to rename the controller)
Hello,
I'm using your yii2 extension on a project I'm doing, but I have a doubt: How can I extend to create my own controller? I have already read the documentation (https://github.com/amnah/yii2-user#how-do-i-extend-this-package) but I had problems in understanding the example you gave. Please keep in mind I'm fairly new to programming, so I would greatly appreciate it if you could be as detailed as possible when giving the explanation.
Thanks a lot and keep up the great work!