From 80694e4974715d7eb7932f1dc13e97bc195d272d Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:57:52 -0400 Subject: [PATCH] DOCSP-42155: adjust for updated source constants (#3110) * DOCSP-42155: adjust for updated source constants * MW PR fixes 1 --- docs/cache.txt | 2 +- docs/compatibility.txt | 4 ++-- docs/eloquent-models.txt | 4 ++-- docs/eloquent-models/model-class.txt | 24 +++++++++---------- docs/eloquent-models/relationships.txt | 20 ++++++++-------- docs/eloquent-models/schema-builder.txt | 10 ++++---- docs/feature-compatibility.txt | 18 +++++++------- docs/fundamentals.txt | 2 +- docs/fundamentals/aggregation-builder.txt | 6 ++--- docs/fundamentals/connection.txt | 2 +- .../connection/connect-to-mongodb.txt | 8 +++---- docs/fundamentals/database-collection.txt | 10 ++++---- docs/fundamentals/read-operations.txt | 2 +- docs/fundamentals/write-operations.txt | 20 ++++++++-------- .../framework-compatibility-laravel.rst | 2 +- docs/index.txt | 19 ++++++++------- docs/issues-and-help.txt | 6 ++--- docs/query-builder.txt | 6 ++--- docs/quick-start.txt | 4 ++-- docs/quick-start/download-and-install.txt | 12 +++++----- docs/quick-start/next-steps.txt | 4 ++-- docs/quick-start/view-data.txt | 2 +- docs/quick-start/write-data.txt | 5 ++-- docs/transactions.txt | 10 ++++---- docs/upgrade.txt | 6 ++--- docs/usage-examples/deleteMany.txt | 2 +- docs/usage-examples/deleteOne.txt | 2 +- docs/usage-examples/find.txt | 2 +- docs/usage-examples/findOne.txt | 2 +- docs/usage-examples/updateMany.txt | 2 +- docs/usage-examples/updateOne.txt | 2 +- docs/user-authentication.txt | 2 +- 32 files changed, 111 insertions(+), 111 deletions(-) diff --git a/docs/cache.txt b/docs/cache.txt index 19609b94b..d3fd0f6e6 100644 --- a/docs/cache.txt +++ b/docs/cache.txt @@ -150,7 +150,7 @@ adds 5, and removes 2. .. note:: - {+odm-short+} supports incrementing and decrementing with integer and float values. + The {+odm-short+} supports incrementing and decrementing with integer and float values. For more information about using the cache, see the `Laravel Cache documentation `__. diff --git a/docs/compatibility.txt b/docs/compatibility.txt index dc0b33148..e02bda581 100644 --- a/docs/compatibility.txt +++ b/docs/compatibility.txt @@ -21,10 +21,10 @@ Laravel Compatibility --------------------- The following compatibility table specifies the versions of Laravel and -{+odm-short+} that you can use together. +the {+odm-short+} that you can use together. .. include:: /includes/framework-compatibility-laravel.rst -To find compatibility information for unmaintained versions of {+odm-short+}, +To find compatibility information for unmaintained versions of the {+odm-short+}, see `Laravel Version Compatibility <{+mongodb-laravel-gh+}/blob/3.9/README.md#installation>`__ on GitHub. diff --git a/docs/eloquent-models.txt b/docs/eloquent-models.txt index 95fe24d15..8aee6baf7 100644 --- a/docs/eloquent-models.txt +++ b/docs/eloquent-models.txt @@ -13,12 +13,12 @@ Eloquent Models Eloquent models are part of the Laravel Eloquent object-relational mapping (ORM) framework, which lets you to work with data in a relational -database by using model classes and Eloquent syntax. {+odm-short+} extends +database by using model classes and Eloquent syntax. The {+odm-short+} extends this framework so that you can use Eloquent syntax to work with data in a MongoDB database. This section contains guidance on how to use Eloquent models in -{+odm-short+} to work with MongoDB in the following ways: +the {+odm-short+} to work with MongoDB in the following ways: - :ref:`laravel-eloquent-model-class` shows how to define models and customize their behavior diff --git a/docs/eloquent-models/model-class.txt b/docs/eloquent-models/model-class.txt index 9d38fe1a7..f9d3e8bcc 100644 --- a/docs/eloquent-models/model-class.txt +++ b/docs/eloquent-models/model-class.txt @@ -20,12 +20,12 @@ Eloquent Model Class Overview -------- -This guide shows you how to use the {+odm-long+} to define and +This guide shows you how to use {+odm-long+} to define and customize Laravel Eloquent models. You can use these models to work with MongoDB data by using the Laravel Eloquent object-relational mapper (ORM). The following sections explain how to add Laravel Eloquent ORM behaviors -to {+odm-short+} models: +to {+odm-long+} models: - :ref:`laravel-model-define` demonstrates how to create a model class. - :ref:`laravel-authenticatable-model` shows how to set MongoDB as the @@ -47,7 +47,7 @@ Define an Eloquent Model Class Eloquent models are classes that represent your data. They include methods that perform database operations such as inserts, updates, and deletes. -To declare a {+odm-short+} model, create a class in the ``app/Models`` +To declare a {+odm-long+} model, create a class in the ``app/Models`` directory of your Laravel application that extends ``MongoDB\Laravel\Eloquent\Model`` as shown in the following code example: @@ -78,8 +78,8 @@ Extend the Authenticatable Model -------------------------------- To configure MongoDB as the Laravel user provider, you can extend the -{+odm-short+} ``MongoDB\Laravel\Auth\User`` class. The following code example -shows how to extend this class: +{+odm-short+} ``MongoDB\Laravel\Auth\User`` class. The following code +example shows how to extend this class: .. literalinclude:: /includes/eloquent-models/AuthenticatableUser.php :language: php @@ -155,7 +155,7 @@ To learn more about primary key behavior and customization options, see in the Laravel docs. To learn more about the ``_id`` field, ObjectIDs, and the MongoDB document -structure, see :manual:`Documents ` in the MongoDB server docs. +structure, see :manual:`Documents ` in the Server manual. .. _laravel-model-soft-delete: @@ -227,7 +227,7 @@ less than three years ago: Planet::where( 'discovery_dt', '>', new DateTime('-3 years'))->get(); To learn more about MongoDB's data types, see :manual:`BSON Types ` -in the MongoDB server docs. +in the Server manual. To learn more about the Laravel casting helper and supported types, see `Attribute Casting `__ in the Laravel docs. @@ -289,7 +289,7 @@ in the Laravel docs. Extend Third-Party Model Classes -------------------------------- -You can use {+odm-short+} to extend a third-party model class by +You can use the {+odm-short+} to extend a third-party model class by including the ``DocumentModel`` trait when defining your model class. By including this trait, you can make the third-party class compatible with MongoDB. @@ -299,7 +299,7 @@ declare the following properties in your class: - ``$primaryKey = '_id'``, because the ``_id`` field uniquely identifies MongoDB documents -- ``$keyType = 'string'``, because {+odm-short+} casts MongoDB +- ``$keyType = 'string'``, because the {+odm-short+} casts MongoDB ``ObjectId`` values to type ``string`` Extended Class Example @@ -344,7 +344,7 @@ appropriate import to your model: .. note:: When enabling soft deletes on a mass prunable model, you must import the - following {+odm-short+} packages: + following {+odm-long+} packages: - ``MongoDB\Laravel\Eloquent\SoftDeletes`` - ``MongoDB\Laravel\Eloquent\MassPrunable`` @@ -437,11 +437,11 @@ You can define the new model class with the following behavior: In the ``"WASP-39 b"`` document in the following code, the ``schema_version`` field value is less than ``2``. When you retrieve the -document, {+odm-short+} adds the ``galaxy`` field and updates the schema +document, the {+odm-short+} adds the ``galaxy`` field and updates the schema version to the current version, ``2``. The ``"Saturn"`` document does not contain the ``schema_version`` field, -so {+odm-short+} assigns it the current schema version upon saving. +so the {+odm-short+} assigns it the current schema version upon saving. Finally, the code retrieves the models from the collection to demonstrate the changes: diff --git a/docs/eloquent-models/relationships.txt b/docs/eloquent-models/relationships.txt index b71b8b8c2..a4a2c87a3 100644 --- a/docs/eloquent-models/relationships.txt +++ b/docs/eloquent-models/relationships.txt @@ -32,7 +32,7 @@ related model by using the same syntax as you use to access a property on the model. The following sections describe the Laravel Eloquent and MongoDB-specific -relationships available in {+odm-short+} and show examples of how to define +relationships available in the {+odm-short+} and show examples of how to define and use them: - :ref:`One to one relationship `, @@ -59,7 +59,7 @@ When you add a one to one relationship, Eloquent lets you access the model by using a dynamic property and stores the model's document ID on the related model. -In {+odm-short+}, you can define a one to one relationship by using the +In {+odm-long+}, you can define a one to one relationship by using the ``hasOne()`` method or ``belongsTo()`` method. When you add the inverse of the relationship by using the ``belongsTo()`` @@ -143,7 +143,7 @@ When you add a one to many relationship method, Eloquent lets you access the model by using a dynamic property and stores the parent model's document ID on each child model document. -In {+odm-short+}, you can define a one to many relationship by adding the +In {+odm-long+}, you can define a one to many relationship by adding the ``hasMany()`` method on the parent class and, optionally, the ``belongsTo()`` method on the child class. @@ -234,17 +234,17 @@ A many to many relationship consists of a relationship between two different model types in which, for each type of model, an instance of the model can be related to multiple instances of the other type. -In {+odm-short+}, you can define a many to many relationship by adding the +In {+odm-long+}, you can define a many to many relationship by adding the ``belongsToMany()`` method to both related classes. When you define a many to many relationship in a relational database, Laravel -creates a pivot table to track the relationships. When you use {+odm-short+}, +creates a pivot table to track the relationships. When you use the {+odm-short+}, it omits the pivot table creation and adds the related document IDs to a document field derived from the related model class name. .. tip:: - Since {+odm-short+} uses a document field instead of a pivot table, omit + Since the {+odm-short+} uses a document field instead of a pivot table, omit the pivot table parameter from the ``belongsToMany()`` constructor or set it to ``null``. @@ -365,7 +365,7 @@ to meet one or more of the following requirements: data - Reducing the number of reads required to fetch the data -In {+odm-short+}, you can define embedded documents by adding one of the +In {+odm-long+}, you can define embedded documents by adding one of the following methods: - ``embedsOne()`` to embed a single document @@ -377,7 +377,7 @@ following methods: objects. To learn more about the MongoDB embedded document pattern, see the following -MongoDB server tutorials: +MongoDB Server tutorials: - :manual:`Model One-to-One Relationships with Embedded Documents ` - :manual:`Model One-to-Many Relationships with Embedded Documents ` @@ -446,13 +446,13 @@ running the code: Cross-Database Relationships ---------------------------- -A cross-database relationship in {+odm-short+} is a relationship between models +A cross-database relationship in {+odm-long+} is a relationship between models stored in a relational database and models stored in a MongoDB database. When you add a cross-database relationship, Eloquent lets you access the related models by using a dynamic property. -{+odm-short+} supports the following cross-database relationship methods: +The {+odm-short+} supports the following cross-database relationship methods: - ``hasOne()`` - ``hasMany()`` diff --git a/docs/eloquent-models/schema-builder.txt b/docs/eloquent-models/schema-builder.txt index 0003d3e7b..510365d06 100644 --- a/docs/eloquent-models/schema-builder.txt +++ b/docs/eloquent-models/schema-builder.txt @@ -24,14 +24,14 @@ Laravel provides a **facade** to access the schema builder class ``Schema``, which lets you create and modify tables. Facades are static interfaces to classes that make the syntax more concise and improve testability. -{+odm-short+} supports a subset of the index and collection management methods +The {+odm-short+} supports a subset of the index and collection management methods in the Laravel ``Schema`` facade. To learn more about facades, see `Facades `__ in the Laravel documentation. The following sections describe the Laravel schema builder features available -in {+odm-short+} and show examples of how to use them: +in the {+odm-short+} and show examples of how to use them: - :ref:`` - :ref:`` @@ -39,7 +39,7 @@ in {+odm-short+} and show examples of how to use them: .. note:: - {+odm-short+} supports managing indexes and collections, but + The {+odm-short+} supports managing indexes and collections, but excludes support for MongoDB JSON schemas for data validation. To learn more about JSON schema validation, see :manual:`Schema Validation ` in the {+server-docs-name+}. @@ -67,7 +67,7 @@ following changes to perform the schema changes on your MongoDB database: - Replace the ``Illuminate\Database\Schema\Blueprint`` import with ``MongoDB\Laravel\Schema\Blueprint`` if it is referenced in your migration -- Use only commands and syntax supported by {+odm-short+} +- Use only commands and syntax supported by the {+odm-short+} .. tip:: @@ -251,7 +251,7 @@ in the {+server-docs-name+}. Create Sparse, TTL, and Unique Indexes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can use {+odm-short+} helper methods to create the following types of +You can use {+odm-long+} helper methods to create the following types of indexes: - Sparse indexes, which allow index entries only for documents that contain the diff --git a/docs/feature-compatibility.txt b/docs/feature-compatibility.txt index 0c28300ba..57c8c7486 100644 --- a/docs/feature-compatibility.txt +++ b/docs/feature-compatibility.txt @@ -21,11 +21,11 @@ Overview -------- This guide describes the Laravel features that are supported by -the {+odm-long+}. This page discusses Laravel version 11.x feature -availability in {+odm-short+}. +{+odm-long+}. This page discusses Laravel version 11.x feature +availability in the {+odm-short+}. The following sections contain tables that describe whether individual -features are available in {+odm-short+}. +features are available in the {+odm-short+}. Database Features ----------------- @@ -66,7 +66,7 @@ Database Features Query Features -------------- -The following Eloquent methods are not supported in {+odm-short+}: +The following Eloquent methods are not supported in the {+odm-short+}: - ``toSql()`` - ``toRawSql()`` @@ -168,19 +168,19 @@ The following Eloquent methods are not supported in {+odm-short+}: Pagination Features ------------------- -{+odm-short+} supports all Laravel pagination features. +The {+odm-short+} supports all Laravel pagination features. Migration Features ------------------ -{+odm-short+} supports all Laravel migration features, but the +The {+odm-short+} supports all Laravel migration features, but the implementation is specific to MongoDB's schemaless model. Seeding Features ---------------- -{+odm-short+} supports all Laravel seeding features. +The {+odm-short+} supports all Laravel seeding features. Eloquent Features ----------------- @@ -268,7 +268,7 @@ Eloquent Relationship Features Eloquent Collection Features ---------------------------- -{+odm-short+} supports all Eloquent collection features. +The {+odm-short+} supports all Eloquent collection features. Eloquent Mutator Features ------------------------- @@ -304,4 +304,4 @@ Eloquent Mutator Features Eloquent Model Factory Features ------------------------------- -{+odm-short+} supports all Eloquent factory features. +The {+odm-short+} supports all Eloquent factory features. diff --git a/docs/fundamentals.txt b/docs/fundamentals.txt index d5ee9e796..f0945ad63 100644 --- a/docs/fundamentals.txt +++ b/docs/fundamentals.txt @@ -21,7 +21,7 @@ Fundamentals /fundamentals/write-operations /fundamentals/aggregation-builder -Learn more about the following concepts related to the {+odm-long+}: +Learn more about the following concepts related to {+odm-long+}: - :ref:`laravel-fundamentals-connection` - :ref:`laravel-db-coll` diff --git a/docs/fundamentals/aggregation-builder.txt b/docs/fundamentals/aggregation-builder.txt index 79d650499..0dbcd3823 100644 --- a/docs/fundamentals/aggregation-builder.txt +++ b/docs/fundamentals/aggregation-builder.txt @@ -33,7 +33,7 @@ An aggregation pipeline is composed of **aggregation stages**. Aggregation stages use operators to process input data and produce data that the next stage uses as its input. -The {+odm-short+} aggregation builder lets you build aggregation stages and +The {+odm-long+} aggregation builder lets you build aggregation stages and aggregation pipelines. The following sections show examples of how to use the aggregation builder to create the stages of an aggregation pipeline: @@ -43,7 +43,7 @@ aggregation builder to create the stages of an aggregation pipeline: .. tip:: - The aggregation builder feature is available only in {+odm-short+} versions + The aggregation builder feature is available only in {+odm-long+} versions 4.3 and later. To learn more about running aggregations without using the aggregation builder, see :ref:`laravel-query-builder-aggregations` in the Query Builder guide. @@ -136,7 +136,7 @@ available indexes and reduce the amount of data the subsequent stages process. aggregation stages. This example constructs a query filter for a **match** aggregation stage by -using the ``MongoDB\Builder\Query`` builder. The match stage includes the the +using the ``MongoDB\Builder\Query`` builder. The match stage includes the following criteria: - Returns results that match either of the query filters by using the diff --git a/docs/fundamentals/connection.txt b/docs/fundamentals/connection.txt index 3141cfeaf..26a937323 100644 --- a/docs/fundamentals/connection.txt +++ b/docs/fundamentals/connection.txt @@ -26,7 +26,7 @@ Connections Overview -------- -Learn how to use {+odm-short+} to set up a connection to a MongoDB deployment +Learn how to use {+odm-long+} to set up a connection to a MongoDB deployment and specify connection behavior in the following sections: - :ref:`laravel-connect-to-mongodb` diff --git a/docs/fundamentals/connection/connect-to-mongodb.txt b/docs/fundamentals/connection/connect-to-mongodb.txt index 5d697b3a2..d17bcf2be 100644 --- a/docs/fundamentals/connection/connect-to-mongodb.txt +++ b/docs/fundamentals/connection/connect-to-mongodb.txt @@ -21,7 +21,7 @@ Overview -------- In this guide, you can learn how to connect your Laravel application to a -MongoDB instance or replica set deployment by using {+odm-short+}. +MongoDB instance or replica set deployment by using {+odm-long+}. This guide includes the following sections: @@ -41,7 +41,7 @@ Connection URI -------------- A **connection URI**, also known as a connection string, specifies how -{+odm-short+} connects to MongoDB and how to behave while connected. +the {+odm-short+} connects to MongoDB and how to behave while connected. Parts of a Connection URI ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -86,7 +86,7 @@ To learn more about connection options, see Laravel Database Connection Configuration ------------------------------------------ -{+odm-short+} lets you configure your MongoDB database connection in the +The {+odm-short+} lets you configure your MongoDB database connection in the ``config/database.php`` Laravel application file. You can specify the following connection details in this file: @@ -308,7 +308,7 @@ following sample values: DB_URI="mongodb://myUser:myPass123@host1:27017,host2:27017,host3:27017/?replicaSet=myRS" -When connecting to a replica set, the library that {+odm-short+} uses to manage +When connecting to a replica set, the library that the {+odm-short+} uses to manage connections with MongoDB performs the following actions unless otherwise specified: diff --git a/docs/fundamentals/database-collection.txt b/docs/fundamentals/database-collection.txt index 7bbae4786..dbb6d7b0c 100644 --- a/docs/fundamentals/database-collection.txt +++ b/docs/fundamentals/database-collection.txt @@ -20,14 +20,14 @@ Databases and Collections Overview -------- -In this guide, you can learn how to use {+odm-short+} to access +In this guide, you can learn how to use {+odm-long+} to access and manage MongoDB databases and collections. MongoDB organizes data in a hierarchical structure. A MongoDB deployment contains one or more **databases**, and each database contains one or more **collections**. In each collection, MongoDB stores data as **documents** that contain field-and-value pairs. In -{+odm-short+}, you can access documents through Eloquent models. +the {+odm-short+}, you can access documents through Eloquent models. To learn more about the document data format, see :manual:`Documents ` in the {+server-docs-name+}. @@ -68,7 +68,7 @@ create a database connection to the ``animals`` database in the ], ... ] -When you set a default database connection, {+odm-short+} uses that +When you set a default database connection, the {+odm-short+} uses that connection for operations, but you can specify multiple database connections in your ``config/database.php`` file. @@ -107,7 +107,7 @@ to store your model in a database other than the default, override the The following example shows how to override the ``$connection`` property on the ``Flower`` model class to use the ``mongodb_alt`` connection. -This directs {+odm-short+} to store the model in the ``flowers`` +This directs the {+odm-short+} to store the model in the ``flowers`` collection of the ``plants`` database, instead of in the default database: .. code-block:: php @@ -123,7 +123,7 @@ Access a Collection ------------------- When you create model class that extends -``MongoDB\Laravel\Eloquent\Model``, {+odm-short+} stores the model data +``MongoDB\Laravel\Eloquent\Model``, the {+odm-short+} stores the model data in a collection with a name formatted as the snake case plural form of your model class name. diff --git a/docs/fundamentals/read-operations.txt b/docs/fundamentals/read-operations.txt index 023494613..d5605033b 100644 --- a/docs/fundamentals/read-operations.txt +++ b/docs/fundamentals/read-operations.txt @@ -21,7 +21,7 @@ Read Operations Overview -------- -In this guide, you can learn how to use {+odm-short+} to perform **find operations** +In this guide, you can learn how to use {+odm-long+} to perform **find operations** on your MongoDB collections. Find operations allow you to retrieve documents based on criteria that you specify. diff --git a/docs/fundamentals/write-operations.txt b/docs/fundamentals/write-operations.txt index cc7d81337..6554d2dd0 100644 --- a/docs/fundamentals/write-operations.txt +++ b/docs/fundamentals/write-operations.txt @@ -20,7 +20,7 @@ Write Operations Overview -------- -In this guide, you can learn how to use {+odm-short+} to perform +In this guide, you can learn how to use {+odm-long+} to perform **write operations** on your MongoDB collections. Write operations include inserting, updating, and deleting data based on specified criteria. @@ -58,7 +58,7 @@ Insert Documents ---------------- In this section, you can learn how to insert documents into MongoDB collections -from your Laravel application by using the {+odm-long+}. +from your Laravel application by using {+odm-long+}. When you insert the documents, ensure the data does not violate any unique indexes on the collection. When inserting the first document of a @@ -69,7 +69,7 @@ For more information on creating indexes on MongoDB collections by using the Laravel schema builder, see the :ref:`laravel-eloquent-indexes` section of the Schema Builder documentation. -To learn more about Eloquent models in {+odm-short+}, see the :ref:`laravel-eloquent-models` +To learn more about Eloquent models in the {+odm-short+}, see the :ref:`laravel-eloquent-models` section. Insert a Document Examples @@ -195,7 +195,7 @@ of the model and calling its ``save()`` method: When the ``save()`` method succeeds, the model instance on which you called the method contains the updated values. -If the operation fails, {+odm-short+} assigns the model instance a ``null`` value. +If the operation fails, the {+odm-short+} assigns the model instance a ``null`` value. The following example shows how to update a document by chaining methods to retrieve and update the first matching document: @@ -212,7 +212,7 @@ retrieve and update the first matching document: When the ``update()`` method succeeds, the operation returns the number of documents updated. -If the retrieve part of the call does not match any documents, {+odm-short+} +If the retrieve part of the call does not match any documents, the {+odm-short+} returns the following error: .. code-block:: none @@ -242,7 +242,7 @@ When the ``update()`` method succeeds, the operation returns the number of documents updated. If the retrieve part of the call does not match any documents in the -collection, {+odm-short+} returns the following error: +collection, the {+odm-short+} returns the following error: .. code-block:: none :copyable: false @@ -279,7 +279,7 @@ $update)`` method accepts the following parameters: - ``$uniqueBy``: List of fields that uniquely identify documents in your first array parameter. - ``$update``: Optional list of fields to update if a matching document - exists. If you omit this parameter, {+odm-short+} updates all fields. + exists. If you omit this parameter, the {+odm-short+} updates all fields. To specify an upsert in the ``upsert()`` method, set parameters as shown in the following code example: @@ -518,7 +518,7 @@ structure of a positional operator update call on a single matching document: .. note:: - Currently, {+odm-short+} offers this operation only on the ``DB`` facade + Currently, the {+odm-short+} offers this operation only on the ``DB`` facade and not on the Eloquent ORM. .. code-block:: none @@ -567,7 +567,7 @@ Delete Documents ---------------- In this section, you can learn how to delete documents from a MongoDB collection -by using {+odm-short+}. Use delete operations to remove data from your MongoDB +by using the {+odm-short+}. Use delete operations to remove data from your MongoDB database. This section provides examples of the following delete operations: @@ -575,7 +575,7 @@ This section provides examples of the following delete operations: - :ref:`Delete one document ` - :ref:`Delete multiple documents ` -To learn about the Laravel features available in {+odm-short+} that modify +To learn about the Laravel features available in the {+odm-short+} that modify delete behavior, see the following sections: - :ref:`Soft delete `, which lets you mark diff --git a/docs/includes/framework-compatibility-laravel.rst b/docs/includes/framework-compatibility-laravel.rst index 608560dd1..723f0e776 100644 --- a/docs/includes/framework-compatibility-laravel.rst +++ b/docs/includes/framework-compatibility-laravel.rst @@ -2,7 +2,7 @@ :header-rows: 1 :stub-columns: 1 - * - {+odm-short+} Version + * - {+odm-long+} Version - Laravel 11.x - Laravel 10.x - Laravel 9.x diff --git a/docs/index.txt b/docs/index.txt index 6cc7ea429..12269e0c4 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,5 +1,5 @@ =============== -{+odm-short+} +{+odm-long+} =============== .. facet:: @@ -32,10 +32,11 @@ Introduction ------------ -Welcome to the documentation site for the official {+odm-long+}. -This package extends methods in the PHP Laravel API to work with MongoDB as -a datastore in your Laravel application. {+odm-short+} allows you to use -Laravel Eloquent and Query Builder syntax to work with your MongoDB data. +Welcome to the documentation site for {+odm-long+}, the official +Laravel integration for MongoDB. This package extends methods in the PHP +Laravel API to work with MongoDB as a datastore in your Laravel +application. The {+odm-short+} allows you to use Laravel Eloquent and +Query Builder syntax to work with your MongoDB data. .. note:: @@ -47,7 +48,7 @@ Laravel Eloquent and Query Builder syntax to work with your MongoDB data. Quick Start ----------- -Learn how to add {+odm-short+} to a Laravel web application, connect to +Learn how to add the {+odm-short+} to a Laravel web application, connect to MongoDB hosted on MongoDB Atlas, and begin working with data in the :ref:`laravel-quick-start` section. @@ -60,7 +61,7 @@ MongoDB operations in the :ref:`laravel-usage-examples` section. Fundamentals ------------ -To learn how to perform the following tasks by using {+odm-short+}, +To learn how to perform the following tasks by using the {+odm-short+}, see the following content: - :ref:`laravel-fundamentals-connection` @@ -85,13 +86,13 @@ more resources in the :ref:`laravel-issues-and-help` section. Feature Compatibility --------------------- -Learn about Laravel features that {+odm-short+} supports in the +Learn about Laravel features that the {+odm-short+} supports in the :ref:`laravel-feature-compat` section. Compatibility ------------- -To learn more about which versions of the {+odm-long+} and Laravel are +To learn more about which versions of {+odm-long+} and Laravel are compatible, see the :ref:`laravel-compatibility` section. Upgrade Versions diff --git a/docs/issues-and-help.txt b/docs/issues-and-help.txt index 197f0a5b1..cedbc3c22 100644 --- a/docs/issues-and-help.txt +++ b/docs/issues-and-help.txt @@ -12,7 +12,7 @@ Issues & Help :keywords: debug, report bug, request, contribute, github, support We are lucky to have a vibrant PHP community that includes users of varying -experience with {+php-library+} and {+odm-short+}. To get support for +experience with {+php-library+} and the {+odm-short+}. To get support for general questions, search or post in the :community-forum:`MongoDB PHP Community Forums `. @@ -22,7 +22,7 @@ To learn more about MongoDB support options, see the Bugs / Feature Requests ----------------------- -If you find a bug or want to see a new feature in {+odm-short+}, +If you find a bug or want to see a new feature in the {+odm-short+}, please report it as a GitHub issue in the `mongodb/laravel-mongodb <{+mongodb-laravel-gh+}>`__ repository. @@ -53,7 +53,7 @@ For general questions and support requests, please use one of MongoDB's Pull Requests ------------- -We are happy to accept contributions to help improve {+odm-short+}. +We are happy to accept contributions to help improve {+odm-long+}. We track current development in `PHPORM `__ MongoDB JIRA project. diff --git a/docs/query-builder.txt b/docs/query-builder.txt index dc3225e37..822a4f42e 100644 --- a/docs/query-builder.txt +++ b/docs/query-builder.txt @@ -27,7 +27,7 @@ supported database. .. note:: - {+odm-short+} extends Laravel's query builder and Eloquent ORM, which can + The {+odm-short+} extends Laravel's query builder and Eloquent ORM, which can run similar database operations. To learn more about retrieving documents by using Eloquent models, see :ref:`laravel-fundamentals-retrieve`. @@ -36,7 +36,7 @@ lets you perform database operations. Facades, which are static interfaces to classes, make the syntax more concise, avoid runtime errors, and improve testability. -{+odm-short+} aliases the ``DB`` method ``table()`` as the ``collection()`` +The {+odm-short+} aliases the ``DB`` method ``table()`` as the ``collection()`` method. Chain methods to specify commands and any constraints. Then, chain the ``get()`` method at the end to run the methods and retrieve the results. The following example shows the syntax of a query builder call: @@ -1056,7 +1056,7 @@ $update)`` query builder method accepts the following parameters: - ``$uniqueBy``: List of fields that uniquely identify documents in your first array parameter. - ``$update``: Optional list of fields to update if a matching document - exists. If you omit this parameter, {+odm-short+} updates all fields. + exists. If you omit this parameter, the {+odm-short+} updates all fields. The following example shows how to use the ``upsert()`` query builder method to update or insert documents based on the following instructions: diff --git a/docs/quick-start.txt b/docs/quick-start.txt index d3a87cbf6..39d8ba0b4 100644 --- a/docs/quick-start.txt +++ b/docs/quick-start.txt @@ -20,7 +20,7 @@ Quick Start Overview -------- -This guide shows you how to add the {+odm-long+} to a new Laravel web +This guide shows you how to add {+odm-long+} to a new Laravel web application, connect to a MongoDB cluster hosted on MongoDB Atlas, and perform read and write operations on the data. @@ -40,7 +40,7 @@ read and write operations on the data. Laravel, see `Connecting to MongoDB `__ in the {+php-library+} documentation. -{+odm-short+} extends the Laravel Eloquent and Query Builder syntax to +The {+odm-short+} extends the Laravel Eloquent and Query Builder syntax to store and retrieve data from MongoDB. MongoDB Atlas is a fully managed cloud database service that hosts your diff --git a/docs/quick-start/download-and-install.txt b/docs/quick-start/download-and-install.txt index 5d9d1d69f..5e9139ec8 100644 --- a/docs/quick-start/download-and-install.txt +++ b/docs/quick-start/download-and-install.txt @@ -33,7 +33,7 @@ to a Laravel web application. .. step:: Install the {+php-extension+} - {+odm-short+} requires the {+php-extension+} to manage MongoDB + {+odm-long+} requires the {+php-extension+} to manage MongoDB connections and commands. Follow the `Installing the MongoDB PHP Driver with PECL `__ guide to install the {+php-extension+}. @@ -41,7 +41,7 @@ to a Laravel web application. .. step:: Install Laravel Ensure that the version of Laravel you install is compatible with the - version of {+odm-short+}. To learn which versions are compatible, + version of the {+odm-short+}. To learn which versions are compatible, see the :ref:`laravel-compatibility` page. Run the following command to install Laravel: @@ -93,9 +93,9 @@ to a Laravel web application. php artisan key:generate - .. step:: Add {+odm-short+} to the dependencies + .. step:: Add {+odm-long+} to the dependencies - Run the following command to add the {+odm-short+} dependency to + Run the following command to add the {+odm-long+} dependency to your application: .. code-block:: bash @@ -110,7 +110,7 @@ to a Laravel web application. "mongodb/laravel-mongodb": "^{+package-version+}" - After completing these steps, you have a new Laravel project with the - {+odm-short+} dependencies installed. + After completing these steps, you have a new Laravel project with + the {+odm-short+} dependencies installed. .. include:: /includes/quick-start/troubleshoot.rst diff --git a/docs/quick-start/next-steps.txt b/docs/quick-start/next-steps.txt index 1afcc2f7e..1a7f45c6e 100644 --- a/docs/quick-start/next-steps.txt +++ b/docs/quick-start/next-steps.txt @@ -14,14 +14,14 @@ Next Steps Congratulations on completing the Quick Start tutorial! After you complete these steps, you have a Laravel web application that -uses the {+odm-long+} to connect to your MongoDB deployment, run a query on +uses {+odm-long+} to connect to your MongoDB deployment, run a query on the sample data, and render a retrieved result. You can download the web application project by cloning the `laravel-quickstart `__ GitHub repository. -Learn more about {+odm-short+} features from the following resources: +Learn more about {+odm-long+} features from the following resources: - :ref:`laravel-fundamentals-connection`: learn how to configure your MongoDB connection. diff --git a/docs/quick-start/view-data.txt b/docs/quick-start/view-data.txt index 9be7334af..f29b2bd12 100644 --- a/docs/quick-start/view-data.txt +++ b/docs/quick-start/view-data.txt @@ -33,7 +33,7 @@ View MongoDB Data INFO Controller [app/Http/Controllers/MovieController.php] created successfully. - .. step:: Edit the model to use {+odm-short+} + .. step:: Edit the model to use the {+odm-short+} Open the ``Movie.php`` model in your ``app/Models`` directory and make the following edits: diff --git a/docs/quick-start/write-data.txt b/docs/quick-start/write-data.txt index d8a01666c..14a971ebd 100644 --- a/docs/quick-start/write-data.txt +++ b/docs/quick-start/write-data.txt @@ -56,7 +56,6 @@ Write Data to MongoDB 'store' ]); - .. step:: Update the model fields Update the ``Movie`` model in the ``app/Models`` directory to @@ -79,14 +78,14 @@ Write Data to MongoDB .. code-block:: json { - "title": "The {+odm-short+} Quick Start", + "title": "The {+odm-long+} Quick Start", "year": 2024, "runtime": 15, "imdb": { "rating": 9.5, "votes": 1 }, - "plot": "This movie entry was created by running through the {+odm-short+} Quick Start tutorial." + "plot": "This movie entry was created by running through the {+odm-long+} Quick Start tutorial." } Send the JSON payload to the endpoint as a ``POST`` request by running diff --git a/docs/transactions.txt b/docs/transactions.txt index e85f06361..377423d67 100644 --- a/docs/transactions.txt +++ b/docs/transactions.txt @@ -21,11 +21,11 @@ Overview -------- In this guide, you can learn how to perform a **transaction** in MongoDB by -using the {+odm-long+}. Transactions let you run a sequence of write operations +using {+odm-long+}. Transactions let you run a sequence of write operations that update the data only after the transaction is committed. If the transaction fails, the {+php-library+} that manages MongoDB operations -for {+odm-short+} ensures that MongoDB discards all the changes made within +for the {+odm-short+} ensures that MongoDB discards all the changes made within the transaction before they become visible. This property of transactions that ensures that all changes within a transaction are either applied or discarded is called **atomicity**. @@ -51,7 +51,7 @@ This guide contains the following sections: .. tip:: Transactions Learning Byte - Practice using {+odm-short+} to perform transactions + Practice using the {+odm-short+} to perform transactions in the `Laravel Transactions Learning Byte `__. @@ -66,7 +66,7 @@ version and topology: - MongoDB version 4.0 or later - A replica set deployment or sharded cluster -MongoDB server and {+odm-short+} have the following limitations: +MongoDB Server and the {+odm-short+} have the following limitations: - In MongoDB versions 4.2 and earlier, write operations performed within a transaction must be on existing collections. In MongoDB versions 4.4 and @@ -78,7 +78,7 @@ MongoDB server and {+odm-short+} have the following limitations: transaction within another one, the extension raises a ``RuntimeException``. To learn more about this limitation, see :manual:`Transactions and Sessions ` in the {+server-docs-name+}. -- The {+odm-long+} does not support the database testing traits +- {+odm-long+} does not support the database testing traits ``Illuminate\Foundation\Testing\DatabaseTransactions`` and ``Illuminate\Foundation\Testing\RefreshDatabase``. As a workaround, you can create migrations with the ``Illuminate\Foundation\Testing\DatabaseMigrations`` trait to reset the database after each test. diff --git a/docs/upgrade.txt b/docs/upgrade.txt index 46308d6de..5d8ca09a3 100644 --- a/docs/upgrade.txt +++ b/docs/upgrade.txt @@ -20,7 +20,7 @@ Upgrade Library Version Overview -------- -On this page, you can learn how to upgrade {+odm-short+} to a new major version. +On this page, you can learn how to upgrade {+odm-long+} to a new major version. This page also includes the changes you must make to your application to upgrade your object-document mapper (ODM) version without losing functionality, if applicable. @@ -33,7 +33,7 @@ Before you upgrade, perform the following actions: your application connects to and the version of Laravel that your application runs on. See the :ref:`` page for this information. -- Address any breaking changes between the version of {+odm-short+} that +- Address any breaking changes between the version of the {+odm-short+} that your application now uses and your planned upgrade version in the :ref:`` section of this guide. @@ -53,7 +53,7 @@ Breaking Changes ---------------- A breaking change is a modification in a convention or behavior in -a specific version of {+odm-short+} that might prevent your application +a specific version of the {+odm-short+} that might prevent your application from working as expected. The breaking changes in this section are categorized by the major diff --git a/docs/usage-examples/deleteMany.txt b/docs/usage-examples/deleteMany.txt index 14a1091f8..cf8680184 100644 --- a/docs/usage-examples/deleteMany.txt +++ b/docs/usage-examples/deleteMany.txt @@ -59,6 +59,6 @@ The example calls the following methods on the ``Movie`` model: .. tip:: - To learn more about deleting documents with {+odm-short+}, see the :ref:`laravel-fundamentals-delete-documents` + To learn more about deleting documents with the {+odm-short+}, see the :ref:`laravel-fundamentals-delete-documents` section of the Write Operations guide. diff --git a/docs/usage-examples/deleteOne.txt b/docs/usage-examples/deleteOne.txt index 9c8d6b127..1298255da 100644 --- a/docs/usage-examples/deleteOne.txt +++ b/docs/usage-examples/deleteOne.txt @@ -60,7 +60,7 @@ The example calls the following methods on the ``Movie`` model: .. tip:: - To learn more about deleting documents with {+odm-short+}, see the `Deleting Models + To learn more about deleting documents with the {+odm-short+}, see the `Deleting Models `__ section of the Laravel documentation. diff --git a/docs/usage-examples/find.txt b/docs/usage-examples/find.txt index b12c97f41..957ece537 100644 --- a/docs/usage-examples/find.txt +++ b/docs/usage-examples/find.txt @@ -86,5 +86,5 @@ The example calls the following methods on the ``Movie`` model: .. tip:: - To learn about other ways to retrieve documents with {+odm-short+}, see the + To learn about other ways to retrieve documents with the {+odm-short+}, see the :ref:`laravel-fundamentals-retrieve` guide. diff --git a/docs/usage-examples/findOne.txt b/docs/usage-examples/findOne.txt index 815d7923e..aa0e035f1 100644 --- a/docs/usage-examples/findOne.txt +++ b/docs/usage-examples/findOne.txt @@ -66,5 +66,5 @@ The example calls the following methods on the ``Movie`` model: .. tip:: - To learn more about retrieving documents with {+odm-short+}, see the + To learn more about retrieving documents with the {+odm-short+}, see the :ref:`laravel-fundamentals-retrieve` guide. diff --git a/docs/usage-examples/updateMany.txt b/docs/usage-examples/updateMany.txt index 7fd5bfd1b..89c262da7 100644 --- a/docs/usage-examples/updateMany.txt +++ b/docs/usage-examples/updateMany.txt @@ -61,6 +61,6 @@ The example calls the following methods on the ``Movie`` model: .. tip:: - To learn more about updating data with {+odm-short+}, see the :ref:`laravel-fundamentals-modify-documents` + To learn more about updating data with the {+odm-short+}, see the :ref:`laravel-fundamentals-modify-documents` section of the Write Operations guide. diff --git a/docs/usage-examples/updateOne.txt b/docs/usage-examples/updateOne.txt index 42fcda477..ecdc8982d 100644 --- a/docs/usage-examples/updateOne.txt +++ b/docs/usage-examples/updateOne.txt @@ -61,6 +61,6 @@ The example calls the following methods on the ``Movie`` model: .. tip:: - To learn more about updating data with {+odm-short+}, see the :ref:`laravel-fundamentals-modify-documents` + To learn more about updating data with the {+odm-short+}, see the :ref:`laravel-fundamentals-modify-documents` section of the Write Operations guide. diff --git a/docs/user-authentication.txt b/docs/user-authentication.txt index d02b8b089..65d983ed5 100644 --- a/docs/user-authentication.txt +++ b/docs/user-authentication.txt @@ -129,7 +129,7 @@ Sanctum and publish its migration file: composer require laravel/sanctum php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider" -To use Laravel Sanctum with {+odm-short+}, modify the ``PersonalAccessToken`` model provided +To use Laravel Sanctum with the {+odm-short+}, modify the ``PersonalAccessToken`` model provided by Sanctum to use the ``DocumentModel`` trait from the ``MongoDB\Laravel\Eloquent`` namespace. The following code modifies the ``PersonalAccessToken`` model to enable MongoDB: