Parziphal / parse

Parse with an Eloquent-like interface for Laravel
MIT License
17 stars 13 forks source link

upgrade #26

Open ahmedawad2 opened 5 years ago

ahmedawad2 commented 5 years ago

hello all, thank you for such a great work. i want to mention that Parse SDK has an update that includes aggregate() function, which helps aggregation in Parse. you need to update to a later version indeed. i really need that :+1: thanks :)

Parziphal commented 5 years ago

Hello~

I'll have a look at the aggregate function.

Parziphal commented 5 years ago

I've changed the version constraint so it requires Parse 1.2+ (instead of 1.2.*).

You can call aggregate() like this:

$results = Post::aggregate($pipeline);

aggregate() will be called directly to the ParseQuery through method overloading.

I was checking if it'd be necessary to create a new aggregate() method to handle the results, but I tested the aggregate() method of ParseQuery and saw it returns arrays instead of ParseObjects, so a new method is not necessary, the results value is returned as is.

ahmedawad2 commented 5 years ago

thank you very much, that was a really appreciated effort :) good luck