laravel-mongodb
laravel-mongodb copied to clipboard
Violating default Laravel first() method behaviour
Description:
when i am using DB::table("users")->where("_id","xyz")->first(); this is returning an array but laravel default behaviour of first() method should return object not an array. If i am using Model query like User::where("_id","xyz")->first() it's returning object that is perfectly fine but in case of DB queries it returning array not object so here you are violating the default behaviour of first() method
Expected behaviour
first() method should return an object
Actual behaviour
but first() method is returning an array