Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

codestudiohq/casthacker

 
 

Repository files navigation

Cruddy by Design

During my talk at Laracon 2017, I shared some strategies I use to split large controllers into multiple small controllers.

The core idea is to try and stick to the 7 standard REST/CRUD actions in your controllers:

  • Index
  • Show
  • Create
  • Store
  • Edit
  • Update
  • Destroy

Using this convention as a "rule" is a good way to force yourself to keep your controllers from becoming bloated, and can often lead to learning interesting new things about your domain.

For the presentation, I put together a demo app called "CastHacker" that showcases podcasts about software development. It's not a "real" app by any means (lots of imaginary features, no tests, etc.); it's just enough code to demonstrate the concepts from the presentation. Feel free to clone it and play with it locally if you like though.

I've written up each refactoring I shared in the presentation as a detailed pull request, so to get started header to pull request #1:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 75.8%
  • HTML 20.0%
  • Vue 3.8%
  • ApacheConf 0.4%