mercredi 18 août 2021

Laravel 5.7: Is it possible to add direct a value in the table?

I was wondering, if it possible to add directly a value in the table. Because I would like that all with the value "1" are registered

Schema::table('games', function (Blueprint $table) {
        $table->integer('rankPosition', '1');
});

Update solution:

Schema::table('games', function (Blueprint $table) {
        table->integer('rankPosition')->default(1);
});


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

Aucun commentaire:

Enregistrer un commentaire