Closed ghost closed 6 years ago
I think it only works for 'date' type, you could use the mutator to format your input data.
public function setCreatedAtAttribute($value)
{
$this->attributes['created_at'] = Carbon::parse(request('created_at'))->toDateString();
}
Labels: possible bug
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Description:
When a data row's type is set to 'timestamp', the format option has no effect on how it is displayed in the 'browse' or 'read' blade templates. It seems to only work for 'date' types.
Steps To Reproduce:
Edit the Bread on any table that has columns of the
TIMESTAMP
type (e.g. the created_at and update_at columns). Add a custom format option to the json details, and then check the boxes for the column to displayed for Browse and Read.Then after navigating to the Browse or Read page for that table, the custom format will be ignored, and the timestamp will be displayed as its default, which for mysql will be in "Y-m-d G:i:s"