---
title: "Discussion on \"Laravel Case Study: How to Extend Paginate to Data Collection in Laravel\" | Hashnode"
description: "Discussion on \"Laravel Case Study: How to Extend Paginate to Data Collection in Laravel\". Sometimes I have difficulty sorting data, for example, I want to sort data based on existing relationships with orderBy() and it doesn't work.\nMy alternative solution tried to utilize sortBy(), this only works for data collection types. I have to run..."
url: "https://hashnode.com/posts/laravel-case-study-how-to-extend-paginate-to-data-collection-in-laravel/635257968bdd752620461b0a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Laravel Case Study: How to Extend Paginate to Data Collection in Laravel](https://easylaravel.hashnode.dev/laravel-case-study-how-to-extend-paginate-to-data-collection-in-laravel?utm_source=hashnode&utm_medium=feed)

Sometimes I have difficulty sorting data, for example, I want to sort data based on existing relationships with orderBy() and it doesn't work. My alternative solution tried to utilize sortBy(), this only works for data collection types. I have to run...

Oct 21, 2022 · 1 min read · easylaravel.hashnode.dev  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#php](https://hashnode.com/tag/php)
-   [#pagination](https://hashnode.com/tag/pagination)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Musli](https://hashnode.com/@codingmusli)

@codingmusli · Indonesia

  
[View profile](https://hashnode.com/@codingmusli)

Laravel Developer

Laravel Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
