martin-c91 / laratwit

1 stars 0 forks source link

getTweets #6

Closed Lelectrolux closed 6 years ago

Lelectrolux commented 6 years ago

getTweets should be moved to the Tweet model, be made static, and be renamed forUsers

Tweet::forUsers($users) vs $user->getTweets($users).

You would expect $user->getTweets() to return tweets belonging to the $user variable, and not need a $userIds parameter.

Even User::getTweets() feels like a badly named User::with('tweets').

Anyways, at least make it static, as it doesn't have anything to do with a specific user.

martin-c91 commented 6 years ago

Thanks.