にnullで私はここで、Laravel 5でcreated_at
フィールドタイムスタンプ(updated_atの、のcreated_at)はLaravel 5
をupdated_at
に問題がある、私の移行です:
Schema::create('lots', function (Blueprint $table) {
$table->increments('id');
$table->integer('lot');
$table->integer('is_active');
$table->timestamps();
});
しかし、私はいくつかを挿入updated_at
およびcreated_at
フィールドはnullです。現在のタイムスタンプで自動補完するにはどうすればよいですか?
私はこのようなデータを挿入します。
\DB::table('admin_lots')->insert([
'lot' => $request->cycle_lot,
'is_active' => '1',
]);
感謝を。
データを挿入する方法を教えてください。 –