Welcome Guest, Not a member yet? Register   Sign In
Should I place image create/delete code in model or controller?

I have built a simple gallery for a project im working on and I'd like to know if it's recommended to place code for deleting and creating images in the model or the controller?

For example I currently have a delete function in my controller which first runs code to delete the main image and thumbnail image from the server, and then calls the delete function in my model to get rid of their database entries. Now I'm wondering if it's more correct to have the image deletion take place in the model as well.

thanks in advance for your replies.

move all that to your model =)

only use the controller to check if the user calling the function is allowed to do that, and that kind of things

Theme © iAndrew 2016 - Forum software by © MyBB