Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Code Examples of transform

Discover how to use Laravel's transform method in real-world applications. Browse 2 examples from popular open-source projects.

2 examples
The transform method iterates over the collection and calls the given callback with each item in the collection. The items in the collection will be replaced by the values returned by the callback.
Read more in the official Laravel docs.

akaunting/akaunting

  • 9348
  • Created Sep 2017
  • Updated Nov 2025

Files in this example

  • app/Http/Controllers/Settings/Modules.php
View full example

inertiajs/pingcrm

  • 2292
  • Created Mar 2019
  • Updated Feb 2025

Files in this example

  • app/Http/Controllers/UsersController.php
View full example

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.