I am doing:
User::all();
to get all the users from users table. I want to select all the users except current logged in user. How should I
You can get the current user's id with auth()->id(). Then pass that to the query:
auth()->id()
$users = User::where('id', '!=', auth()->id())->get();