![]() |
This is an autoinstaller app (composer), to understand how to create a modular app.
Includes a simple register/login/logout. All modules and all dependencies are in the same directory, mantaining the base CI4 structure: Code: app/Modules/Users/Config To install & test, follow instructions on https://github.com/XXPerez/Codeigniter4Modular Code: composer create-project xxperez/codeigniter4modular Take a view to the example controllers and libraries, it's very easy !! Fell free to comment and contribute to it. Thanks.
With CI4, I think this is not necessary.
Simple can sub folder or https://codeigniter.com/user_guide/gener..._apps.html ... CI3 + HMVC + ... + = CI4 Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams (10-06-2020, 12:20 PM)nc03061981 Wrote: With CI4, I think this is not necessary. Hi NC, for me, this is not the same, separate apps does not share anything. I have found that I need share common libaries, helpers, languages, but also there are specific parts of a project that I like to be isolated, but with all components inside the same structure. This is only an example of how can be done with subfolders as you say. Also, I have old apps in CI3 that give me the possibility to migrated them to CI4 with few code changes. The beter of CI4 is that you can choose the structure that better fits to your needs !!
If you change the folder Modules = folder Packages, because Packages are better suited to CI4.
With CI4 you should dev 2 seperate Packages: package Users and package Dashboard are better suited to CI4. Users can composer them is better. Or both in one Package Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams (10-07-2020, 01:13 AM)nc03061981 Wrote: If you change the folder Modules = folder Packages, because Packages are better suited to CI4. Yes, of course it could be a package, but only if you want to give public access to the code. For private development, I prefer Modules. Thanks
Yes
Thanks Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams
Modular Updated:
Added ModuleCreate to allow creation of php module base files In your ROOTPATH: Code: php spark module:create Modulename This command, create this files:
Also, can create this empty directories, for future use:
Options: Code: php spark module:create Modulename -f ModulesDirectory Code: php spark module:create Modulename -c FCLMVO To install & test, follow instructions on https://github.com/XXPerez/Codeigniter4Modular Or: Code: composer create-project xxperez/codeigniter4modular
Codeigniter4Modular
Solved some problems on install Refactory for user login/register example Project : https://github.com/XXPerez/Codeigniter4Modular Install: Code: composer create-project xxperez/codeigniter4modular Or follow composer instructions to install.
If you want private modules then you should place them in the root along with the app and system folders
app system Modules -- Blog -- Users -- etc; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(03-01-2022, 01:24 AM)InsiteFX Wrote: If you want private modules then you should place them in the root along with the app and system folders Thanks for the tip, the modules directory can be placed anywhere, only changing the Autoload.php file: Code: public $psr4 = [ |
Welcome Guest, Not a member yet? Register Sign In |