Bloated User Model

Posted 3 months ago by JuanRangel

Hello, I am trying to figure out the best place to place code that is responsible for reporting purposes. For example, I have a User class that can get the top/bottom performers. It's a simple way to get the users with the most conversations in the system, so the user with the most conversations are at the top of the scopeTopPerformers method. My user model is starting to get really bloated with a lot of these methods that are used just for reporting to the admin area.

What is the best practice for handling these kinds of methods/functions?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.