简体   繁体   中英

How can update db column status using date laravel

使用日期值自动更新数据库列状态我该怎么做。

I guess you're trying to set the TIMESTAMP column to use CURRENT_TIMESTAMP as default value, try this on your migration:

Schema::table('flights', function (Blueprint $table) {
    $table->timestamp('taking_off_at')->setCurrent();
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM