Can we use Model in CI4 View? |
I want to use the model directly in my view so is it ok?
because I am a little bit confused regarding this please help me. Currently, I am working in CI4.
No. This is bad.
MVC Model knows nothing about the View. The view doesn't know anything about the model. Their link is the controller.
you might read this @yogeshsingh https://towardsdatascience.com/everythin...827930b4c1 to have an intro about MVC
then have a look at this in the docs: https://codeigniter4.github.io/userguide...index.html have a go and post your code if you get a problem |
Welcome Guest, Not a member yet? Register Sign In |