search

Home  >  Q&A  >  body text

The example usage of default in the video personally feels a bit inappropriate.

$Request.get.id|get_hiredate|date='Y-m-d',

|default='1987-08-04' If the id is passed in, there is also an existing value in front of default; if Passing an id that does not exist. If the second parameter of the date function is null, it will return 1970-01-01. The subsequent default value will never be executed. It just happens to be 1970-01-01 in the video ###
其铭其铭1642 days ago1523

reply all(1)I'll reply

  • 其铭

    其铭2020-05-28 17:27:43

    Entry time{$Request.get.id|get_hiredate|default=strtotime('1987-08-04')|date='Y-m-d',

    } This seems to work###

    reply
    0
  • Cancelreply