Questions tagged [jenssegers-mongodb]

A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

An Eloquent model and Query builder with support for MongoDB, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods.

GitHub Link

192 questions
0
votes
0 answers

jenssegers/laravel-mongodb $pipeline is not a list (unexpected index: "$group")

I am getting this error when I try to use group and count. ERROR: InvalidArgumentException in Aggregate.php line 93: $pipeline is not a list (unexpected index: "$group") MongoDB version: 3.2.9 jenssegers/mongodb version : 3.1.0-alpha Here is my…
Code Poet
  • 147
  • 1
  • 3
  • 16
0
votes
1 answer

Jenssegers/mongodo relations not working after upgrading to Laravel 5.3

After upgrading to Laravel 5.3, querying hybrid relations relations are throwing an error. FatalErrorException in Builder.php line 613: Call to a member function all() on array I am using HybridRelations trait, and trying to query a Moloquent model…
chethanks
  • 47
  • 1
  • 9
0
votes
1 answer

Jenssegers / select('column') returns more columns than the one specified in the select

I have the following issue with jenssegers query builder (I'm a new user): print_r(DB::table($tablename)->where('_id',$_id)->select($table_structure_record['field'])->get()); returns me more than one column, despite only one column is specified in…
Nono
  • 45
  • 9
0
votes
0 answers

Laravel 5.2 and jenssegers/mongodb REST API with virtualhost

I am creating a REST API with Laravel 5.2 and I'm also using MongoDB with the jenssegers/mongodb library. I have a virtualhost for my application so I can go to the url eg: http://myapp.local.com and simulate how it would be on the real server and…
pgzm29
  • 160
  • 1
  • 13
0
votes
2 answers

Laravel 5 composer update not working?

I am using Laravel version 5.2 and Jenssegers MongoDB. I installed both and working fine but I have to use any other library and made changes in composer.json after that use command composer update. After using this command automatically Jenssegers…
user3663481
0
votes
0 answers

Laravel and MongoDB configuration not working

I'm trying to configure Laravel 5 with MongoDB by this link. Error D:\wamp\www\lfirst>composer require jenssegers/mongodb You are running composer with xdebug enabled. This has a major impact on runtime performance. See…
ching
  • 122
  • 7
0
votes
0 answers

orderByRaw Not working with jenssegers mongodb Laravel 5

This the remaining part of my query but whenever i use the below code for ordering by type in the sequel its gives error : exception: the $sort key specification must be an object Query Part : $result =$query->orderByRaw("FIELD('Type',…
rahul
  • 776
  • 5
  • 30
0
votes
2 answers

Update Status when each order time past 20 minutes

I use Laravel Lumen framework and jenssegers/laravel-mongodb package , my query in project is : $time_5_min_ago = Carbon::now()->subMinute(5); $time_10_min_ago = Carbon::now()->subMinute(10); $time_15_min_ago =…
bitcodr
  • 1,395
  • 5
  • 21
  • 44
0
votes
1 answer

map() Mongo db Query - jenssegers/laravel-mongodb

Please see my database query: db.comments .find({}) .forEach(function(doc) { doc.comments.map(function(c) { if (c.active == 1) { c.status = 0; …
KTAnj
  • 1,346
  • 14
  • 36
0
votes
2 answers

How to pass this MongoDb query to Laravel jenssegers/laravel-mongodb

I need to run this in laravel. db.blog.aggregate([ { $project : { likes_count: {$size: { "$ifNull": [ "$like", [] ] } } } }, { $sort: {"likes_count":-1} } ]) How to implement this…
0
votes
1 answer

Mongo $gt, $lt query not working for NumberInt

Here is my screenshot, I don't understand why sometimes value being stored as a a number and sometimes as NumberInt. And When i am try this query for search { "price.egglessPrice" : { '$gt' : 360, '$lt':370} } I always get the result…
Nishchit
  • 18,284
  • 12
  • 54
  • 81
0
votes
1 answer

Order resultes based on embed collection

Assuming we have multiple documents with the following schema: { "_id" : ObjectId("55ec6108794ac3cc530041ac"), "product": "Product x", "desc": "Blah Blah Blah", "prices" : [ { …
iSun
  • 1,714
  • 6
  • 28
  • 57
0
votes
1 answer

Laravel 4.2 use Sentinel with Jenssegers MongoDB

Is it possible to use Cartalyst/Sentinel with Jenssegers/MongoDB on Laravel 4.2? I'm currently using Sentry, but I want to try Sentinel with new features. After installation, I tried this: $user = Sentinel::register([ 'email' …
Viktor
  • 819
  • 1
  • 12
  • 26
0
votes
0 answers

Bulk/ Batch insert in Mongo takes time 15 sec to 10000 documents

Bulk insert in Mongo takes time i.e average 15 seconds to insert 10000 documents in a collection. My System is 8 core and 16 GB RAM. How can I reduce response time for Mongo Insertion? What mongo configurations can be done to reduce execution…
Somnath Muluk
  • 55,015
  • 38
  • 216
  • 226
0
votes
1 answer

Laravel 5: jenssegers/laravel-date doesn't show correct translation. How do I use Laravel Date correctly?

I have a simple L5 application, where I have to output some dates in a different language and therefore I am using jenssegers/laravel-date package Yet, if I try to use jenssegers new package on my data stored in my database, I don't get the…
LoveAndHappiness
  • 9,735
  • 21
  • 72
  • 106
1 2 3
12
13