i have query exception
SQLSTATE[42S22]: Column not found: 1054 Champ '3' inconnu dans on clause (SQL: select content, name, to_id from message inner join users on users.id = 3 where to_id = 1)
here is my controller :
public function show(User $user) {
$users = DB::table('users')
->select('name','id')
->where('id','!=',auth()->user()->id)
->get();
$messages = DB::table('message')
->join('users','users.id','=',$user->id)
->select('content','name','to_id')
->where('to_id','=',auth()->user()->id)
->get();
return view('conversations/show',compact('users','user','messages'));
}