I have a proble with updated_at, created_at fields in laravel 5.
Here is my migration:
Schema::create('lots', function (Blueprint $table) {
$table->increments('id');
$table->integer('lot');
$table->integer('is_active');
$table->timestamps();
});
But when I insert some data into this table, updated_at and created_at fields are null. How make them autocomplete with current timestamps?
I insert data like this:
\DB::table('admin_lots')->insert([
'lot' => $request->cycle_lot,
'is_active' => '1',
]);
Thanks.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1rQ9Ve5
via IFTTT
Aucun commentaire:
Enregistrer un commentaire