Schema::table('posts', function (Blueprint $table) {
$table->foreignId('user_id')->constrained();
});
in script to define foreign key constraint like in Laravel 7 , How the script can detect references on table users or any table? there is not script has to define table_name
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
in script to define foreign key constraint like in Laravel 7 , How the script can detect references on table users or any table? there is not script has to define table_name