{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/24728","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/24728/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/24728/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/24728/events","html_url":"https://github.com/laravel/framework/pull/24728","id":337663001,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4Nzg5MzUw","number":24728,"title":"[5.7] Add array_keys_exists helper method","user":{"login":"introwit","id":11228182,"node_id":"MDQ6VXNlcjExMjI4MTgy","avatar_url":"https://avatars0.githubusercontent.com/u/11228182?v=4","gravatar_id":"","url":"https://api.github.com/users/introwit","html_url":"https://github.com/introwit","followers_url":"https://api.github.com/users/introwit/followers","following_url":"https://api.github.com/users/introwit/following{/other_user}","gists_url":"https://api.github.com/users/introwit/gists{/gist_id}","starred_url":"https://api.github.com/users/introwit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/introwit/subscriptions","organizations_url":"https://api.github.com/users/introwit/orgs","repos_url":"https://api.github.com/users/introwit/repos","events_url":"https://api.github.com/users/introwit/events{/privacy}","received_events_url":"https://api.github.com/users/introwit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-02T21:05:37Z","updated_at":"2018-07-03T12:57:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/24728","html_url":"https://github.com/laravel/framework/pull/24728","diff_url":"https://github.com/laravel/framework/pull/24728.diff","patch_url":"https://github.com/laravel/framework/pull/24728.patch"},"body":"- PHP's `array_key_exists` method doesn't check for multiple keys.\r\n- This helper method tends to fill that void.\r\n- Have added the tests and will send a PR for the docs if this gets merged.\r\n----\r\n### Update: A practical use case\r\n- While creating an app like Forge, you would have a table/list of 'Services' (with context to Forge, services could be DO, linode, etc.)\r\n- Chances are these services have different set of required API credentials. One requires an API key as well as a secret key, while another just requires the API key.\r\n- So you would like to defines the `allowed_keys` for every service, preferably in a json column \r\n- Example data:\r\n\r\n| id | name | allowed_keys |\r\n| ----|-------- | ------------- |\r\n| 1 | DO  | {\"api_key\": \"\", \"service\": \"\"} |\r\n\r\n- So while validating the request inputs received, the proposed `array_keys_exists` could be really helpful. \r\n\r\n----\r\nOpen to all suggestions 🙂 "},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/402147723","html_url":"https://github.com/laravel/framework/pull/24728#issuecomment-402147723","issue_url":"https://api.github.com/repos/laravel/framework/issues/24728","id":402147723,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjE0NzcyMw==","user":{"login":"devcircus","id":18542852,"node_id":"MDQ6VXNlcjE4NTQyODUy","avatar_url":"https://avatars3.githubusercontent.com/u/18542852?v=4","gravatar_id":"","url":"https://api.github.com/users/devcircus","html_url":"https://github.com/devcircus","followers_url":"https://api.github.com/users/devcircus/followers","following_url":"https://api.github.com/users/devcircus/following{/other_user}","gists_url":"https://api.github.com/users/devcircus/gists{/gist_id}","starred_url":"https://api.github.com/users/devcircus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devcircus/subscriptions","organizations_url":"https://api.github.com/users/devcircus/orgs","repos_url":"https://api.github.com/users/devcircus/repos","events_url":"https://api.github.com/users/devcircus/events{/privacy}","received_events_url":"https://api.github.com/users/devcircus/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T12:57:52Z","updated_at":"2018-07-03T12:57:52Z","author_association":"CONTRIBUTOR","body":"I don't see how this is needed."}}
{"actor":{"display_login":"devcircus"}}