Select a user
where id =! Auth::user->id
// this prevents the query returning the current user logged in
where Auth::user->value1 ,'=', 'value1' || 'value2' || 'value3'
So in english , find the a username where id is not equal to the currently logged in user id and where authenticated user's value1 column equals another user's value1 or value2 or value 3column
Below is a statement, i have done which isn't working correctly however it does work without the OR operator
where(Auth::user()->recommendationWord1, '=' , 'value1')
this statement is an example of the format and contains what I have tried.
$Query = DB::table('users')
->select('username')
->where('id', '!=', Auth::user()->id)
->whereIn(Auth::user()->recommendationWord1 , '=', 'value1', '||' , 'value2', '||' , 'value3'
->get();
Below is the code for my HTML page and how i am posting it
@foreach ($Query as $selectedUser)
Code formatting<p> {{ $selectedUser->username}}</p>
@endforeach