{"action":"opened","number":626,"pull_request":{"url":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls/626","id":48064516,"html_url":"https://github.com/jenssegers/laravel-mongodb/pull/626","diff_url":"https://github.com/jenssegers/laravel-mongodb/pull/626.diff","patch_url":"https://github.com/jenssegers/laravel-mongodb/pull/626.patch","issue_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/issues/626","number":626,"state":"open","locked":false,"title":"allow to sort by $meta-projection","user":{"login":"deadem","id":7988931,"avatar_url":"https://avatars.githubusercontent.com/u/7988931?v=3","gravatar_id":"","url":"https://api.github.com/users/deadem","html_url":"https://github.com/deadem","followers_url":"https://api.github.com/users/deadem/followers","following_url":"https://api.github.com/users/deadem/following{/other_user}","gists_url":"https://api.github.com/users/deadem/gists{/gist_id}","starred_url":"https://api.github.com/users/deadem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deadem/subscriptions","organizations_url":"https://api.github.com/users/deadem/orgs","repos_url":"https://api.github.com/users/deadem/repos","events_url":"https://api.github.com/users/deadem/events{/privacy}","received_events_url":"https://api.github.com/users/deadem/received_events","type":"User","site_admin":false},"body":"Small fix to allow sorting by meta-projections. This is needed for full-text search and sort results by relevancy. For example:\r\n```\r\n$query = Models\\News::whereRaw([\r\n   '$text' => [ '$search' => $request->Input('q') ]\r\n])->project([ 'score' => [ '$meta' => 'textScore' ] ]);\r\n\r\n$query->orderBy('score', [ '$meta' => 'textScore' ]);\r\n```\r\nhttp://docs.mongodb.org/manual/reference/operator/query/text/","created_at":"2015-10-19T12:25:49Z","updated_at":"2015-10-19T12:25:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls/626/commits","review_comments_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls/626/comments","review_comment_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/issues/626/comments","statuses_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/statuses/0446c4761aa2a45ad27e3395b015d7ff76b1d562","head":{"label":"deadem:master","ref":"master","sha":"0446c4761aa2a45ad27e3395b015d7ff76b1d562","user":{"login":"deadem","id":7988931,"avatar_url":"https://avatars.githubusercontent.com/u/7988931?v=3","gravatar_id":"","url":"https://api.github.com/users/deadem","html_url":"https://github.com/deadem","followers_url":"https://api.github.com/users/deadem/followers","following_url":"https://api.github.com/users/deadem/following{/other_user}","gists_url":"https://api.github.com/users/deadem/gists{/gist_id}","starred_url":"https://api.github.com/users/deadem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deadem/subscriptions","organizations_url":"https://api.github.com/users/deadem/orgs","repos_url":"https://api.github.com/users/deadem/repos","events_url":"https://api.github.com/users/deadem/events{/privacy}","received_events_url":"https://api.github.com/users/deadem/received_events","type":"User","site_admin":false},"repo":{"id":44532105,"name":"laravel-mongodb","full_name":"deadem/laravel-mongodb","owner":{"login":"deadem","id":7988931,"avatar_url":"https://avatars.githubusercontent.com/u/7988931?v=3","gravatar_id":"","url":"https://api.github.com/users/deadem","html_url":"https://github.com/deadem","followers_url":"https://api.github.com/users/deadem/followers","following_url":"https://api.github.com/users/deadem/following{/other_user}","gists_url":"https://api.github.com/users/deadem/gists{/gist_id}","starred_url":"https://api.github.com/users/deadem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deadem/subscriptions","organizations_url":"https://api.github.com/users/deadem/orgs","repos_url":"https://api.github.com/users/deadem/repos","events_url":"https://api.github.com/users/deadem/events{/privacy}","received_events_url":"https://api.github.com/users/deadem/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deadem/laravel-mongodb","description":"A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)","fork":true,"url":"https://api.github.com/repos/deadem/laravel-mongodb","forks_url":"https://api.github.com/repos/deadem/laravel-mongodb/forks","keys_url":"https://api.github.com/repos/deadem/laravel-mongodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deadem/laravel-mongodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deadem/laravel-mongodb/teams","hooks_url":"https://api.github.com/repos/deadem/laravel-mongodb/hooks","issue_events_url":"https://api.github.com/repos/deadem/laravel-mongodb/issues/events{/number}","events_url":"https://api.github.com/repos/deadem/laravel-mongodb/events","assignees_url":"https://api.github.com/repos/deadem/laravel-mongodb/assignees{/user}","branches_url":"https://api.github.com/repos/deadem/laravel-mongodb/branches{/branch}","tags_url":"https://api.github.com/repos/deadem/laravel-mongodb/tags","blobs_url":"https://api.github.com/repos/deadem/laravel-mongodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deadem/laravel-mongodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deadem/laravel-mongodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/deadem/laravel-mongodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deadem/laravel-mongodb/statuses/{sha}","languages_url":"https://api.github.com/repos/deadem/laravel-mongodb/languages","stargazers_url":"https://api.github.com/repos/deadem/laravel-mongodb/stargazers","contributors_url":"https://api.github.com/repos/deadem/laravel-mongodb/contributors","subscribers_url":"https://api.github.com/repos/deadem/laravel-mongodb/subscribers","subscription_url":"https://api.github.com/repos/deadem/laravel-mongodb/subscription","commits_url":"https://api.github.com/repos/deadem/laravel-mongodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/deadem/laravel-mongodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/deadem/laravel-mongodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/deadem/laravel-mongodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/deadem/laravel-mongodb/contents/{+path}","compare_url":"https://api.github.com/repos/deadem/laravel-mongodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deadem/laravel-mongodb/merges","archive_url":"https://api.github.com/repos/deadem/laravel-mongodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deadem/laravel-mongodb/downloads","issues_url":"https://api.github.com/repos/deadem/laravel-mongodb/issues{/number}","pulls_url":"https://api.github.com/repos/deadem/laravel-mongodb/pulls{/number}","milestones_url":"https://api.github.com/repos/deadem/laravel-mongodb/milestones{/number}","notifications_url":"https://api.github.com/repos/deadem/laravel-mongodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deadem/laravel-mongodb/labels{/name}","releases_url":"https://api.github.com/repos/deadem/laravel-mongodb/releases{/id}","created_at":"2015-10-19T12:11:43Z","updated_at":"2015-10-19T12:11:44Z","pushed_at":"2015-10-19T12:16:29Z","git_url":"git://github.com/deadem/laravel-mongodb.git","ssh_url":"git@github.com:deadem/laravel-mongodb.git","clone_url":"https://github.com/deadem/laravel-mongodb.git","svn_url":"https://github.com/deadem/laravel-mongodb","homepage":"http://jenssegers.com","size":3084,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenssegers:master","ref":"master","sha":"979dc80141b388c27cc3145dc474516d37467b00","user":{"login":"jenssegers","id":194377,"avatar_url":"https://avatars.githubusercontent.com/u/194377?v=3","gravatar_id":"","url":"https://api.github.com/users/jenssegers","html_url":"https://github.com/jenssegers","followers_url":"https://api.github.com/users/jenssegers/followers","following_url":"https://api.github.com/users/jenssegers/following{/other_user}","gists_url":"https://api.github.com/users/jenssegers/gists{/gist_id}","starred_url":"https://api.github.com/users/jenssegers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenssegers/subscriptions","organizations_url":"https://api.github.com/users/jenssegers/orgs","repos_url":"https://api.github.com/users/jenssegers/repos","events_url":"https://api.github.com/users/jenssegers/events{/privacy}","received_events_url":"https://api.github.com/users/jenssegers/received_events","type":"User","site_admin":false},"repo":{"id":9131292,"name":"laravel-mongodb","full_name":"jenssegers/laravel-mongodb","owner":{"login":"jenssegers","id":194377,"avatar_url":"https://avatars.githubusercontent.com/u/194377?v=3","gravatar_id":"","url":"https://api.github.com/users/jenssegers","html_url":"https://github.com/jenssegers","followers_url":"https://api.github.com/users/jenssegers/followers","following_url":"https://api.github.com/users/jenssegers/following{/other_user}","gists_url":"https://api.github.com/users/jenssegers/gists{/gist_id}","starred_url":"https://api.github.com/users/jenssegers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenssegers/subscriptions","organizations_url":"https://api.github.com/users/jenssegers/orgs","repos_url":"https://api.github.com/users/jenssegers/repos","events_url":"https://api.github.com/users/jenssegers/events{/privacy}","received_events_url":"https://api.github.com/users/jenssegers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jenssegers/laravel-mongodb","description":"A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)","fork":false,"url":"https://api.github.com/repos/jenssegers/laravel-mongodb","forks_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/forks","keys_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/teams","hooks_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/hooks","issue_events_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/issues/events{/number}","events_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/events","assignees_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/assignees{/user}","branches_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/branches{/branch}","tags_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/tags","blobs_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/statuses/{sha}","languages_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/languages","stargazers_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/stargazers","contributors_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/contributors","subscribers_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/subscribers","subscription_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/subscription","commits_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/contents/{+path}","compare_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/merges","archive_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/downloads","issues_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/issues{/number}","pulls_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls{/number}","milestones_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/milestones{/number}","notifications_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/labels{/name}","releases_url":"https://api.github.com/repos/jenssegers/laravel-mongodb/releases{/id}","created_at":"2013-03-31T14:31:04Z","updated_at":"2015-10-19T09:09:45Z","pushed_at":"2015-10-16T08:24:47Z","git_url":"git://github.com/jenssegers/laravel-mongodb.git","ssh_url":"git@github.com:jenssegers/laravel-mongodb.git","clone_url":"https://github.com/jenssegers/laravel-mongodb.git","svn_url":"https://github.com/jenssegers/laravel-mongodb","homepage":"http://jenssegers.com","size":3084,"stargazers_count":1315,"watchers_count":1315,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":311,"mirror_url":null,"open_issues_count":135,"forks":311,"open_issues":135,"watchers":1315,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls/626"},"html":{"href":"https://github.com/jenssegers/laravel-mongodb/pull/626"},"issue":{"href":"https://api.github.com/repos/jenssegers/laravel-mongodb/issues/626"},"comments":{"href":"https://api.github.com/repos/jenssegers/laravel-mongodb/issues/626/comments"},"review_comments":{"href":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls/626/comments"},"review_comment":{"href":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenssegers/laravel-mongodb/pulls/626/commits"},"statuses":{"href":"https://api.github.com/repos/jenssegers/laravel-mongodb/statuses/0446c4761aa2a45ad27e3395b015d7ff76b1d562"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":1,"changed_files":1}}