I would like to make a timestamp column with a default value of CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP using the Laravel Schema Builder/Migrations. I hav
Starting from Laravel 5.1.26, tagged on 2015-12-02, a useCurrent() modifier has been added:
Schema::table('users', function ($table) {
$table->timestamp('created')->useCurrent();
});
PR 10962 (followed by commit 15c487fe) leaded to this addition.
You may also want to read issues 3602 and 11518 which are of interest.
Basically, MySQL 5.7 (with default config) requires you to define either a default value or nullable for time fields.