Moloquent ia a MongoDB based Eloquent model and Query builder for Laravel
Questions tagged [moloquent]
23 questions
0
votes
1 answer
Create Index using Moloquent with Laravel
I am new to MongoDB.
I am using Jensegger/Laravel-MongoDB Moloquent features to work on Mongo DB.
I am trying to create an index of a collection in this method:-
Schema::collection('events', function ($table) {
$table->index(['location' =>…

Saswat
- 12,320
- 16
- 77
- 156
0
votes
1 answer
Unable to find index for $geoNear Laravel
I am using the Moloquent model with Laravel 5.6. here is my collection record given below:-
{
"_id" : ObjectId("5afe619dbe0b8d0e5876b16b"),
"name" : "Central Park",
"categories" : [
"4d4b7105d754a06376d81259",
…

Saswat
- 12,320
- 16
- 77
- 156
0
votes
1 answer
Undefinded Index in Mongodb Array When Calling From Laravel
I have Laravel set up with Moloquent in order to use a seperate Mongodb I have set up. I'm using the database Articles, which has a collection "articles", where each article is an array with info like title, url, image, etc. Some things I can pull…

Alteredorange
- 556
- 1
- 6
- 23
0
votes
1 answer
how to change a key value in mongodb when i push data with moloquent
$cart = Cart::where('user_id', $request->user_id)->push('cart', [
"uuid" => uniqid(),
"product_id" => $request->product_id,
"product_type_id" => $request->product_type_id,
"address_id" => $request->address_id,
"voucher_id"…

Stevanus Yohanes
- 89
- 2
- 8
0
votes
1 answer
Mongo projection with $arrayElemAt
I have the following mongo query. With this example I get a subdocument (with lookup) "transport_type". This subdocument have many properties. I want only the id and the name. How can I combine $project with $arrayElemAt and $filter? Right now It…

Michalis
- 6,686
- 13
- 52
- 78
0
votes
1 answer
MongoDB AuthenticationException in InsertOne
I'm using jessegers/mongodb to make the connection with Mongo DB and Laravel 5.4, but when I send the data to insert it gives me an authentication error.
my model has this:
protected $fillable = ['nombre','edad'];
my controller has
$usuario = new…

Steven Sparkies
- 41
- 1
- 6
0
votes
0 answers
Search with LIKE expression in nested object with Moloquent
I'm trying to implement filter for logs in the Laravel5 model. Logs stored in mongodb collection.
The record has this structure. But this structure is not fixed! It can be just an object with not all of these properties. Moreover it can be very…

Alex Slipknot
- 2,439
- 1
- 18
- 26
0
votes
1 answer
Search through embedded collections in MongoDB
I'm currently working on a PHP (laravel) project where we're using MongoDB (the jenssegers package). I made password resets up on the following structure:
{
"_id" : ObjectId("58d56135b462e816642abbd1"),
"email" : "wesley@foo.bar",
…

sushibrain
- 2,712
- 5
- 33
- 62