Laravel: Set timestamp column to current timestamp

125

<?php

/* For Create */
$table->timestamp('created_at')->useCurrent();

/* For Update */
$table->timestamp('updated_at')->useCurrent()->useCurrentOnUpdate();

Comments

Submit
0 Comments