{"action":"created","issue":{"url":"https://api.github.com/repos/Adldap2/Adldap2/issues/24","labels_url":"https://api.github.com/repos/Adldap2/Adldap2/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/Adldap2/Adldap2/issues/24/comments","events_url":"https://api.github.com/repos/Adldap2/Adldap2/issues/24/events","html_url":"https://github.com/Adldap2/Adldap2/issues/24","id":72184558,"number":24,"title":"Feedback on search API","user":{"login":"stevebauman","id":6421846,"avatar_url":"https://avatars.githubusercontent.com/u/6421846?v=3","gravatar_id":"","url":"https://api.github.com/users/stevebauman","html_url":"https://github.com/stevebauman","followers_url":"https://api.github.com/users/stevebauman/followers","following_url":"https://api.github.com/users/stevebauman/following{/other_user}","gists_url":"https://api.github.com/users/stevebauman/gists{/gist_id}","starred_url":"https://api.github.com/users/stevebauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevebauman/subscriptions","organizations_url":"https://api.github.com/users/stevebauman/orgs","repos_url":"https://api.github.com/users/stevebauman/repos","events_url":"https://api.github.com/users/stevebauman/events{/privacy}","received_events_url":"https://api.github.com/users/stevebauman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Adldap2/Adldap2/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-30T14:46:57Z","updated_at":"2015-07-29T20:42:08Z","closed_at":"2015-07-29T20:42:08Z","body":"Hey Guys, I'm just looking for some feedback on the search API before it's finalized. I had some ideas but if the current one in place is fine, then that's what I'll go with.\r\n\r\nWhat I'm not sure on:\r\n\r\n**String Operators**\r\n\r\n    $ad->search()->where('cn', 'contains', 'John');\r\n\r\nShould operators be converted into their own function? For example:\r\n\r\n    $ad->search()->where('cn')->contains('John');\r\n\r\nUsing a `where()` method would return a where filter object, which allows you to transform it based on the operator. Thoughts?"},"comment":{"url":"https://api.github.com/repos/Adldap2/Adldap2/issues/comments/126089724","html_url":"https://github.com/Adldap2/Adldap2/issues/24#issuecomment-126089724","issue_url":"https://api.github.com/repos/Adldap2/Adldap2/issues/24","id":126089724,"user":{"login":"stevebauman","id":6421846,"avatar_url":"https://avatars.githubusercontent.com/u/6421846?v=3","gravatar_id":"","url":"https://api.github.com/users/stevebauman","html_url":"https://github.com/stevebauman","followers_url":"https://api.github.com/users/stevebauman/followers","following_url":"https://api.github.com/users/stevebauman/following{/other_user}","gists_url":"https://api.github.com/users/stevebauman/gists{/gist_id}","starred_url":"https://api.github.com/users/stevebauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevebauman/subscriptions","organizations_url":"https://api.github.com/users/stevebauman/orgs","repos_url":"https://api.github.com/users/stevebauman/repos","events_url":"https://api.github.com/users/stevebauman/events{/privacy}","received_events_url":"https://api.github.com/users/stevebauman/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T20:42:08Z","updated_at":"2015-07-29T20:42:08Z","body":"Ended up going with a hybrid of your solution:\r\n\r\n    $ad->search()->whereContains($field, $value);\r\n    $ad->search()->whereStartsWith($field, $value);\r\n    $ad->search()->whereEndsWith($field, $value);\r\n\r\nThanks!"}}