I\'m confused as to when ->get()
in Laravel...
E.G. DB::table(\'users\')->find(1)
doesn\'t need ->get() to retrieve the results, neither
find
returns one row from the database and represent it as a fluent / eloquent object. e.g. SELECT * FROM users WHERE id = 3
is equivalent to DB::table('users')->find(3);
get
returns an array of objects. e.g. SELECT * FROM users WHERE created_at > '2014-10-12'
is equivalent to DB::table('users')->where('created_at', '>', '2014-10-12')->get()
will return an array of objects containing users where the created at field is newer than 4014-10-12.