Hello,
This is my first post. I try o learn ci4. I have some big project working on ci3.
Now i have to improve them and also move on ci4.
I have fresh install on centos 8 with composer.
Because i need a complex system admin with roles and many more i decide to use myth. I need to extend Myth because i need to do a phone verification with sms and also mail verification.
I am stuck on how to extend Myth controller with a new method. I don`t want to modify myth\auth\src\controllers\AuthController.php.
I understande i can create app\controllers\AuthController.php but is not working:
PHP Code:
<?php namespace App\Controllers;
use Myth\Auth\Controllers\AuthController as MyAuth;
class AuthController extends MyAuth
{
public function pregister() {
echo "a";
//return $this->_render($this->config->views['pregister'], ['config' => $this->config]);
}
}
I also modify
PHP Code:
public $views = [
'login' => 'Myth\Auth\Views\login',
'register' => 'Myth\Auth\Views\register',
'pregister' => 'Myth\Auth\Views\register',
'forgot' => 'Myth\Auth\Views\forgot',
'reset' => 'Myth\Auth\Views\reset',
'emailForgot' => 'Myth\Auth\Views\emails\forgot',
'emailActivation' => 'Myth\Auth\Views\emails\activation',
];
Why is not working? What i am doind wrong?