kiwo123
780
5
Laravel

L5.2 unix timestamp on created_at and updated_at

Posted 3 years ago by kiwo123

In order to use date filtering in Algolia I need to set my dates as unix timestamp: ´´´ "date => 1362873600 ´´´

How can I use laravel's timstamp() and save the date as unix timestamp?

Also, is it possible to only use the created_at column? The ´´´$table->timestamps();´´´ creates both a created_at and updated_at column and I dont need the updated_at.

Thanks,

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.