Skip to content

Refactor routes to use Resource Controllers #476

@Nima8FT

Description

@Nima8FT

Currently, multiple routes in the project use separate controllers for each CRUD action.
For example:

  • User: IndexController, CreateController, StoreController, ShowController, EditController, UpdateController, DeleteController
  • Category: IndexController, CreateController, etc.
  • Post: IndexController, CreateController, etc.

This approach leads to many small controllers and repetitive route definitions.

Proposal:

  • Combine each resource's controllers into a single Laravel Resource Controller (e.g., UserController, CategoryController, PostController)
  • Use Route::resource() to define all routes
  • This will simplify route management, reduce boilerplate, and improve maintainability

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions