I have controller
public function users() {
$users = User::all('id');
return view('view', compact('users'))
}
Then in my view, i try to check if $users has id I need
@if (contains($users, Auth::user()->id)
do something
@enif
but nothing happens. How can i check if collection has the id i need?