At Validation
'dob' => 'required|date_format:"d/m/Y"|before:"2006-01-01"',
At View Template
{{$submissions->created_at->format("F d, Y")}}
Reference
1. https://stackoverflow.com/questions/32080734/laravel-validation-date-does-not-match-the-format?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
2. http://php.net/manual/en/function.date.php
3. https://stackoverflow.com/questions/24441395/how-to-change-default-format-at-created-at-and-updated-at-value-laravel?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
No comments:
Post a Comment