dimanche 29 décembre 2019

How to change timestamps in laravel?

i want to change the timestamp to current time but it doesn't work. What should i do?

 $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
            $table->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'));


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire