CI4 Question (Module Calling Module) |
The best exmple is math auth and learn how to implement ed in ci4
https://github.com/lonnieezell/myth-auth
Enlightenment Is Freedom
(06-30-2021, 10:14 PM)[email protected] Wrote: Hi Everyone, what are you trying to do?
(07-01-2021, 03:04 AM)ikesela Wrote:(06-30-2021, 10:14 PM)[email protected] Wrote: Hi Everyone, Hi, I am using HMVC in Codeigniter 4 functionality and I want to call a module in the another module. Like, IN CI3 we use below line, Modules::run('dashboard/index', $data); So, How we can use this in CI4
Create a route to it using the modules namespace see the CodeIgniter User Guide URI Routing.
Ig you need link it in html then look in the url helper for route_to() What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-01-2021, 09:18 PM)InsiteFX Wrote: Create a route to it using the modules namespace see the CodeIgniter User Guide URI Routing. Modules::run() This function is not working in CI4. So, can you please tell me what is the solution for that? PHP Code: $module = new \Namespace\ModuleName(); Add your own module static method called run(). then you can call PHP Code: $module::run(); You will need to setup your run method for any parameters to pass. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |