Hello,
I am using CodeIgniter 4 for some time now and I like it a lot but I have one question that I couldn't find an answer for.
What is the actual difference between ResourcePresenter and ResourceController and when should they be used?
I have some knowledge about but I'd like to confront it with someone else to know whether I'm correct or wrong.
So, as I understood from the docs, ResourceController returns HTTP status codes and processes the request while ResourcePresenter can display views and process the request too (remove, create).
Right now in my ResourceController I have an example code like this:
PHP Code:
public function create()
{
// Do some stuff
// Set flashdata
return redirect()->back();
}
Is the above code a correct approach?