vendredi 28 juin 2019

Laravel 5.8 schema time format hh:mm

I am beginner in Laravel. I have my project in Laravel 5.8.

This is my schema file:

Schema::create('users', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name', 120)->nullable();
            $table->string('surname', 120)->nullable();
            $table->string('email', 120)->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->string('password');
            $table->time('v_day1a')->default('00:00');
            $table->time('v_day1b')->default('00:00');
            $table->time('v_day2a')->default('00:00');
            $table->time('v_day2b')->default('00:00');
            $table->dateTime('last_activity')->nullable();
            $table->rememberToken();
            $table->timestamps();
            $table->engine = "InnoDB";
            $table->charset = 'utf8mb4';
            $table->collation = 'utf8mb4_unicode_ci';

In database in v_day1a, v_day1b, v_day2a, v_day2b I have this format of time: 00:00:00. I need change this to 00:00 (hh:mm).

How can I make it?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/328DESm
via IFTTT

Aucun commentaire:

Enregistrer un commentaire