Skip to main content

"Black Friday" Discount! Only until December 1st: 50% off all membership plans!

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

  • 2444
  • Created Dec 2017
  • Updated Nov 2026

Files in this example

  • app/Repositories/TaggedUserRepository.php
View full example

agorakit/agorakit

  • 457
  • Created May 2016
  • Updated Nov 2026

Files in this example

  • app/Http/Controllers/Admin/GroupAdminsController.php
View full example