Kris Roofe Kris Roofe - 1 year ago 104
PHP Question

How to convert laravel timestamp to a string(php)?

I use laravel as my php framework. In my database, I have a

field that is created with
. I use the databse:query builder to get this field, which is not a simple string.

How can I convert this to a simple string, such as
2016-07-08 22:09:08

I use

Answer Source
date("Y-m-d H:i:s", $timestamp);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download