I am using :
dd(User::find(1)->get());
on a table that has 4994 rows, and the above query returns all the rows.
But when I do :
User::where('id',1)->with('groups')->get()
, I get the right row(just one)
User table has a column called id, which is primary key.
I am using Laravel Framework version 5.1.31 (LTS)
Could anybody tell me what the problem is ?