{"action":"closed","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/9930","labels_url":"https://api.github.com/repos/laravel/framework/issues/9930/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/9930/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/9930/events","html_url":"https://github.com/laravel/framework/issues/9930","id":100853106,"number":9930,"title":"Eloquent date conversion should fallback to Carbon::parse","user":{"login":"shssoichiro","id":5951392,"avatar_url":"https://avatars.githubusercontent.com/u/5951392?v=3","gravatar_id":"","url":"https://api.github.com/users/shssoichiro","html_url":"https://github.com/shssoichiro","followers_url":"https://api.github.com/users/shssoichiro/followers","following_url":"https://api.github.com/users/shssoichiro/following{/other_user}","gists_url":"https://api.github.com/users/shssoichiro/gists{/gist_id}","starred_url":"https://api.github.com/users/shssoichiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shssoichiro/subscriptions","organizations_url":"https://api.github.com/users/shssoichiro/orgs","repos_url":"https://api.github.com/users/shssoichiro/repos","events_url":"https://api.github.com/users/shssoichiro/events{/privacy}","received_events_url":"https://api.github.com/users/shssoichiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-13T19:47:14Z","updated_at":"2015-08-13T21:07:32Z","closed_at":"2015-08-13T21:07:32Z","body":"Currently, Eloquent's conversion of dates to Carbon instances falls back to Carbon::createFromFormat. However, this creates certain inconsistencies.\r\n\r\nFor example: If I pass a date in the format m/d/Y, this passes Laravel's date validator. However, it throws an InvalidArgumentException in Carbon because Illuminate\\Database\\Eloquent\\Model is telling Carbon to expect a Y-m-d format (see screenshot).\r\n\r\nIt would be better to replace `Carbon::createFromFormat($this->getDateFormat(), $value); ` with `Carbon::parse($value);`. This allows more date formats to be automatically converted and resolves the inconsistency between the date validator and Eloquent. Currently the developer has to manually use Carbon::parse before passing the input to Eloquent, which is an added step that in my opinion should be unnecessary.\r\n\r\n![ticketscest canenterpayments fail](https://cloud.githubusercontent.com/assets/5951392/9259872/5924b04a-41d2-11e5-8b62-328790dc49e9.png)\r\n"}}