---
title: "Discussion on \"Time travel after each Laravel Factory\" | Hashnode"
description: "Discussion on \"Time travel after each Laravel Factory\". If you ever tested an endpoint returning a collection of data and, for example, by default, you sort them by created_at, you may have been struggling to check the correct order of the result. If you either created multiple data with User::factory()->..."
url: "https://hashnode.com/posts/laravel-time-travel-factory/6499fa2f5244606d9b5fff31"
---

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

Discussion

# [Time travel after each Laravel Factory](https://theraloss.com/laravel-time-travel-factory?utm_source=hashnode&utm_medium=feed)

If you ever tested an endpoint returning a collection of data and, for example, by default, you sort them by created\_at, you may have been struggling to check the correct order of the result. If you either created multiple data with User::factory()->...

Jul 15, 2021 · 2 min read · theraloss.com  
Updated Jul 12, 2023  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)

## Written by

[Danilo Polani](https://hashnode.com/@theraloss)

@theraloss · Italy

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

Tech & Team lead. Laravel enthusiast.

Senior Software Engineer &amp; Tech/Team Lead @ WeRoad

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
