Date and time types

  • Values are cast to Carbon instances in the application timezone (config('app.timezone')).
  • The date picker sends ISO strings in UTC, they are converted to the application timezone before saving.
  • Values from your code can be given as Carbon, Y-m-d, Y-m-d H:i:s, d.m.Y, d.m.Y H:i or H:i strings.
  • Columns are nullable unless the field is required, and invalid values are refused by validation.

Time picker step

date_step sets the minutes step of the time picker of datetime, timestamp and time fields. The default is 15 minutes, 30 for multiple times. Saved values are not rounded.

Current date as default

default:CURRENT_TIMESTAMP prefills the current date and time in the create form. It is also the column default of date, datetime and timestamp columns, time columns get no database default.

Multiple dates

multiple lets the user pick several dates or times. The values are stored as a JSON array and cast to a collection of Carbon instances.
date values are stored as Y-m-d and time values as H:i:s. datetime and timestamp do not support multiple, the parameter is ignored and the field stays a single value field.

Display format

date_format (alias format) is the PHP date format used by the date picker and in the listing table. Values in this format are also parsed when assigned from your code.
The format changes only how the value is displayed and parsed, the column type and the stored value stay the same.