laravel / ideas

Issues board used for Laravel internals discussions.
939 stars 28 forks source link

Allow useCurrent() on timestamps() #2599

Closed Chico3001 closed 3 years ago

Chico3001 commented 3 years ago

Right now timestamps method wont allow the addition of useCurrent, to do so we need to add the columns in 2 steps:

    $table->timestamp('created_at')->useCurrent();
    $table->timestamp('updated_at')->useCurrent();

it would be nice to have the option to do it in one step:

$table->timestamps()->useCurrent();

themsaid commented 3 years ago

Given that you only need to write the migrations once. You can just split the call into two separate calls like in your example.