Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

anilkumarthakur60's avatar

can we set foreign id to default

I have a users and roles table ...during the user registration process I want to set the foreign id to default 3

            $table->foreignId('role_id')->constrained('roles');

how can i set this foreign id to default value 3

0 likes
1 reply

Please or to participate in this conversation.