public function getFavorites(User $user) { $this->layout->title = $user->username . "'s favorites"; $quotes = $user->favorites()->orderBy('quote_id', 'desc')->whereStatus(1); $quoteCount = $quotes->count(); $paginated = $quotes->paginate(Config::get('per_page')); $this->layout->nest('content', 'user.favorites', ['user' => $user, 'quotes' => $paginated, 'count' => $quoteCount]); }