This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi, I don't quite understand the concept of controllers yet. I have a better grasp of model, but controller is still being elusive, so I have a few questions.
Now, I have a certain model, let's call it 'N', I wish to call N on different pages with different kind of queries. I wish to create a function that takes an input to give me the result array of the specific N's that I want.
I don't think that this function would go inside the model. My question is, would this go inside the controller.php? How would I call on this function in twig? Or would I have to create a component to handle that kind of requests?
In general:
- Models interface with your database.
- Components provide a way to interface with your frontend.
- Controllers are used to interface with your backend.
Browse the Rainlab Blog Plugin to get an idea on plugin structure.
Last updated
This website I am creating is for my personal use. Basically, I don't want people much in my back-end, AT ALL, unless they were relevant.
Therefore, I am trying to create a custom front-end 'back-end' using forms. That would give me much more control over who can access what, and it would also solve the back-end user/ front-end user problem.
Is this stupid or is this perfectly sane?
I am doing the same thing atm with a new plugin. I have a lot of components made.
It's annoying there are 3 different user tables, or using the backend wouldn't be as bad. Mainly because there's no signup for backend users.
1-4 of 4