I am using Laravel 5.1 as Front End and MongoDB as Back end. Now Problem is when i am performing join query from laravel it will return data only from single collection.
I read mongoDB manual and i know that mongoDB is not RDBMS that’s why it is not support any kind of JOINS.
But in my project it is necessary to get data from two different collection i.e Category and Product.
I know JOINS are possible in mongoDB at Client Side i.e Laravel side using DBRef and Manual Relationship.
I did Manual Relationship between Category.Category_ID and Product.Category_ID, But I don't know how to perform client side code for retrieving Data from both Collections.
I am attaching code of laravel 5.1 for LEFT JOIN which is perfectly run with MySQL but not with MongoDB.
// Below Code for LEFT JOIN
$user = DB::table('product')
->leftJoin('category', 'product.category_id', '=', 'category.category_id')
->where('product.product_id','=','category.category_id')
->get();