Short information about unique
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.
Repository: HDInnovations/UNIT3D-Community-Edition
(Github)
★ 1548
Created: Dec 2017
Updated: Aug 2022
Laravel version: 8
Files in the example:
- app/Repositories/TaggedUserRepository.php
Repository: agorakit/agorakit
(Github)
★ 358
Created: May 2016
Updated: Jun 2022
Laravel version: 8
Files in the example:
- app/Http/Controllers/Admin/GroupAdminsController.php