Welcome Guest, Not a member yet? Register   Sign In
Can we use Model in CI4 View?
#1

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.
Reply
#2

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.
Reply
#3

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
CMS CI4     I use Arch Linux by the way 

Reply




Theme © iAndrew 2016 - Forum software by © MyBB