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 unique

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

2 examples
The unique method returns all of the unique items in the collection. The returned collection keeps the original array keys, so in the following example we will use the values method to reset the keys to consecutively numbered indexes.
Read more in the official Laravel docs.

HDInnovations/UNIT3D-Community-Edition

  • 2239
  • Created Dec 2017
  • Updated Nov 2025

Files in this example

  • app/Repositories/TaggedUserRepository.php
View full example

agorakit/agorakit

  • 434
  • Created May 2016
  • Updated Nov 2025

Files in this example

  • app/Http/Controllers/Admin/GroupAdminsController.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.