-
app/Http/Controllers/Admin/GroupAdminsController.php
Open in GitHubuse App\Http\Controllers\Controller; use App\Membership; class GroupAdminsController extends Controller { public function index() { $memberships = Membership::where('membership', Membership::ADMIN) ->with('user') ->get(); $users = collect(); foreach ($memberships as $membership) { $users->push($membership->user); } $users = $users->unique('username'); return view('admin.groupadmins.index')->with('users', $users); } }