Skip to content
Advertisement

Tag: model-view-controller

Should Controller Layer cannot use Repository Layer?

I’m confused about Controller use Repository directly. Is it Repository layer must encapsulated by Service layer? I’m using like this now in Laravel: Is is Bad to use Repository Layer directly from Controller Layer? Answer Note: In regard of MVC-based applications, this answer is a general one. It does not refer to Laravel, in particular. The controller: In a proper

CakePHP4 Edit doesnt update record

Version: 4.2.9 My edit view is populating my inputs with the data, but when I change them and click on save, its not saving but giving me “user has been saved” message. UsersController.php edit function my edit.php Answer Your update code is not complete, you have omitted the patchEntity method.

php mvc url pattern which takes three arguments

I’m new to MVC. what I’ve learned from a few articles and some videos is that the general form of URL in MVC structure is as controller/action. but I’ve come across some URLs like this: www.exmaple.com/users/login/confirm which takes three parameters(users, login, confirm). I don’t understand which one is the controller, which one is the action, and what the third parameter

Advertisement