Skip to main content

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

  • 9408
  • Created Sep 2017
  • Updated Dec 2025

Files in this example

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

inertiajs/pingcrm

  • 2308
  • 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.