php - Laravel - Change created_at to use unix timestamp -


I am working on the Laravel 4 application and would like to save Unix timestamps for the create_at and updated_at fields instead of default timestamps < / P>

"post-text" itemprop = "text">

You can only receive a timestamp property, such as:

  $ Timestamp = $ model-> Made_at-> Timestamp;  

Or, you can override, and create a migration of required fields, such as:

  $ table-> Integer ('created_at'); $ Table & gt; Integer ('updated_at');  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -