Support the ongoing development of Laravel.io →
Eloquent Mail Laravel
Last updated 1 year ago.
0

OK I figured it out for anyone interested.

remove all duplicates, e.g. remove owner if already following $users = $users->unique('id');

if current user is following remove them $users = $users->reject(function ($value, $key) { return $value->id == Auth::user()->id; });

Last updated 4 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

illmatic illmatic Joined 28 Sep 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.