mardi 3 mai 2016

timestamps (updated_at, created_at) are null in laravel 5

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?

Thanks.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire