DEV Community

Discussion on: Single Method Controllers in Laravel

dealloc profile image
Wannes Gennar • Edited

You'll place all related controllers in the same namespace (App\Http\Controllers\Users{Register,Invite, ...}UserController.php)

As indicated in this article, it adheres more closely to the single responsibility principle, that a given class should only do a specific thing.

Personally, I'm leaning more and more towards ADR where a single method controller ties in perfectly.
I highly recommend looking into ADR more, and see for yourself where the advantages lie for your project.