2

Basically, I want to know how to do something like this:

Users::where('id' != $id)->get();

How do I do this with eloquent?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Ashley Wrench
  • 969
  • 8
  • 25

1 Answers1

1

You can do it like this :

Users::where('id', '!=' , $id)->get();

Take a look at this Cheat Sheet.

Maraboc
  • 10,550
  • 3
  • 37
  • 48
  • If it fix your problem you can set this answer as accepted to helpe other poeple to find the solution of similar problem ;) – Maraboc May 21 '15 at 14:31