What is the real benefit of using Controller Resource in Laravel?

1

What is the real benefit of using Controller Resource in Laravel? It is possible to observe that the route file gets cleaner, since the controller methods are called based on the call verbs and routes, but the only benefit would be an organization?

    
asked by anonymous 17.03.2018 / 00:01

1 answer

1

The benefit of using resource type controllers is in the statement itself and in the context.

Since this type of single route declaration creates several routes to handle a variety of actions from an HTTP request.

And by convention, the resource type controller already offers all named actions in a way that contextualizes with the actions performed in creating, updating, querying, and deleting data.

It can still be said that the resource-type controller is a predefined data structure for managing common CRUD operations. (Create, Read, Update, Delete)

    
28.12.2018 / 14:47