简体   繁体   中英

Laravel Voyager v1.1 date format not working

I tried to make the date field with different format on Laravel Voyager 1.1 as shown below:

面包日期字段格式

and yet the upon creation of the record its still using the default format:

日期格式仍然不受影响

the correct syntax is

{ "format" : "%d-%m-%Y" }

When you change the formate, it will only change in view blade ( /vendor/tcg/voyager/resources/views/bread/read.blade.php ) not in edit/add view.

If you want to change it in add/edit view as well, you need to overwrite the default blade of voyager. You need to overwrite/alter following blade file as per your requirement:

/vendor/tcg/voyager/resources/views/formfields/date.blade.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM