Ci4 Learn with Myth |
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; PHP Code: public $views = [
Try this
PHP Code: use Myth\Auth\Controllers\AuthController; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Calling the parent constructor is unnecessary unless you are providing additional functionality - it will be called automatically. @cuculetea can you elaborate on what’s not working? Your setup looks correct - though will also need to add a route to your app/Config/Routes.php in order to reach your new method.
|
Welcome Guest, Not a member yet? Register Sign In |