-3

Hey guys I need help again :D do you guys know how to convert this line of code into a readable format? The format for example is "Oct. 30, 2016"

{{ isset($data) ? $data['chalet']->created_at : old('created_at') }}

BTW old('created_at') is a data inserted to the "created_at" column on my table.

Jane Doe
  • 192
  • 4
  • 18

1 Answers1

1

Thank you @devpro

{{ isset($data) ? date('M. d, Y',strtotime($data['chalet']->created_at)) : date('M, d, Y',strtotime(old('created_at'))) }}
Jane Doe
  • 192
  • 4
  • 18
  • @devpro I'm sorry I just can't upvote your answer awhile ago because I didn't have enough reputation :D – Jane Doe Oct 31 '16 at 11:52