Skip to content

Commit

Permalink
Fix wrong name for driver options in docs (mongodb#3074)
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus authored Jul 30, 2024
1 parent 58682e1 commit 432456b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/fundamentals/connection/connect-to-mongodb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ For a MongoDB database connection, you can specify the following details:
connection behavior. To learn more about connection options, see
:ref:`laravel-connection-auth-options`.

* - ``driverOptions``
* - ``driver_options``
- Specifies options specific to pass to the {+php-library+} that
determine the driver behavior for that connection. To learn more about
driver options, see :ref:`laravel-driver-options`.
Expand All @@ -170,7 +170,7 @@ For a MongoDB database connection, you can specify the following details:
- ``host``
- ``username``
- ``password``
- ``options`` and ``driverOptions``, which are specified by the option name
- ``options`` and ``driver_options``, which are specified by the option name

The following example shows how you can specify your MongoDB connection details
in the ``connections`` array item:
Expand All @@ -187,7 +187,7 @@ in the ``connections`` array item:
'maxPoolSize' => 20,
'w' => 'majority',
],
'driverOptions' => [
'driver_options' => [
'serverApi' => 1,
],
],
Expand Down
6 changes: 3 additions & 3 deletions docs/fundamentals/connection/connection-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Connection Options
:values: reference

.. meta::
:keywords: code example, data source name, dsn, authentication, configuration, options, driverOptions
:keywords: code example, data source name, dsn, authentication, configuration, options, driver_options

.. contents:: On this page
:local:
Expand Down Expand Up @@ -329,7 +329,7 @@ connections and all operations between a Laravel application and MongoDB.

You can specify driver options in your Laravel web application's
``config/database.php`` configuration file. To add driver options,
add the setting and value as an array item in the ``driverOptions`` array
add the setting and value as an array item in the ``driver_options`` array
item, as shown in the following example:

.. code-block:: php
Expand All @@ -340,7 +340,7 @@ item, as shown in the following example:
'dsn' => 'mongodb+srv://mongodb0.example.com/',
'driver' => 'mongodb',
'database' => 'sample_mflix',
'driverOptions' => [
'driver_options' => [
'serverApi' => 1,
'allow_invalid_hostname' => false,
],
Expand Down

0 comments on commit 432456b

Please sign in to comment.