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

39 views Asked by At

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);
});
0

There are 0 answers