DoeJohn
3 years ago
1320
4
Laravel

Migrations: timestamp VS dateTime VS date VS timestamps

Posted 3 years ago by DoeJohn

Can you give me clarification and explain the differences between:

$table->timestamp('published_at');
$table->dateTime('published_at');
$table->date('published_at');
$table->timestamps('published_at');

Also, what are the advantages or disadvantages of using one over another? Are there some reasons when we need to avoid the use of some of these?

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