Schema::create('user_params', function (Blueprint $table) { $table->increments('id'); $table->string('login'); $table->string('versionApp'); $table->string('platform'); $table->timestamps(); }); 

Why is the wrong time recorded in the database? I work in Laravel;

  • Perhaps with a time zone problem. Try to play with her - Dean Gray

1 answer 1

You need to replace the timezone in the configuration file config / app.php

 'timezone' => 'UTC', 

But for more effective work with dates it is advised to use the Carbon library.

  • Yes, I found it, I figured it out, thanks - Ilya