insert data in foreign key table in laravel code example
Example: foreign key laravel migration
$table->foreign('column_name')->references('id')->on('table_name')->onDelete('cascade');
$table->foreign('column_name')->references('id')->on('table_name')->onDelete('cascade');