Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cache.txt
Original file line number Diff line number Diff line change
@@ -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
<https://laravel.com/docs/{+laravel-docs-version+}/cache#cache-usage>`__.
4 changes: 2 additions & 2 deletions docs/compatibility.txt
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions docs/eloquent-models.txt
Original file line number Diff line number Diff line change
@@ -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
24 changes: 12 additions & 12 deletions docs/eloquent-models/model-class.txt
Original file line number Diff line number Diff line change
@@ -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 </core/document>` in the MongoDB server docs.
structure, see :manual:`Documents </core/document>` 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 </reference/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 <https://laravel.com/docs/{+laravel-docs-version+}/eloquent-mutators#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:
20 changes: 10 additions & 10 deletions docs/eloquent-models/relationships.txt
Original file line number Diff line number Diff line change
@@ -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 <laravel-eloquent-relationship-one-to-one>`,
@@ -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 </tutorial/model-embedded-one-to-one-relationships-between-documents/>`
- :manual:`Model One-to-Many Relationships with Embedded Documents </tutorial/model-embedded-one-to-many-relationships-between-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()``
10 changes: 5 additions & 5 deletions docs/eloquent-models/schema-builder.txt
Original file line number Diff line number Diff line change
@@ -24,22 +24,22 @@ 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 <https://laravel.com/docs/{+laravel-docs-version+}/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:`<laravel-eloquent-migrations>`
- :ref:`<laravel-eloquent-collection-exists>`
- :ref:`<laravel-eloquent-indexes>`

.. 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 </core/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
18 changes: 9 additions & 9 deletions docs/feature-compatibility.txt
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion docs/fundamentals.txt
Original file line number Diff line number Diff line change
@@ -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`
6 changes: 3 additions & 3 deletions docs/fundamentals/aggregation-builder.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docs/fundamentals/connection.txt
Original file line number Diff line number Diff line change
@@ -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`
8 changes: 4 additions & 4 deletions docs/fundamentals/connection/connect-to-mongodb.txt
Original file line number Diff line number Diff line change
@@ -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:

10 changes: 5 additions & 5 deletions docs/fundamentals/database-collection.txt
Original file line number Diff line number Diff line change
@@ -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 </core/document/>` 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.

2 changes: 1 addition & 1 deletion docs/fundamentals/read-operations.txt
Original file line number Diff line number Diff line change
@@ -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.

20 changes: 10 additions & 10 deletions docs/fundamentals/write-operations.txt
Original file line number Diff line number Diff line change
@@ -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,15 +567,15 @@ 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:

- :ref:`Delete one document <laravel-fundamentals-delete-one>`
- :ref:`Delete multiple documents <laravel-fundamentals-delete-many>`

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 <laravel-model-soft-delete>`, which lets you mark
2 changes: 1 addition & 1 deletion docs/includes/framework-compatibility-laravel.rst
Original file line number Diff line number Diff line change
@@ -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
19 changes: 10 additions & 9 deletions docs/index.txt
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions docs/issues-and-help.txt
Original file line number Diff line number Diff line change
@@ -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 </tag/php>`.

@@ -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 <https://jira.mongodb.org/projects/PHPORM/summary>`__
MongoDB JIRA project.
6 changes: 3 additions & 3 deletions docs/query-builder.txt
Original file line number Diff line number Diff line change
@@ -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:
4 changes: 2 additions & 2 deletions docs/quick-start.txt
Original file line number Diff line number Diff line change
@@ -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 <https://www.mongodb.com/docs/php-library/current/tutorial/connecting/>`__
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
12 changes: 6 additions & 6 deletions docs/quick-start/download-and-install.txt
Original file line number Diff line number Diff line change
@@ -33,15 +33,15 @@ 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 <https://www.php.net/manual/en/mongodb.installation.pecl.php>`__
guide to install the {+php-extension+}.

.. 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
4 changes: 2 additions & 2 deletions docs/quick-start/next-steps.txt
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/mongodb-university/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.
2 changes: 1 addition & 1 deletion docs/quick-start/view-data.txt
Original file line number Diff line number Diff line change
@@ -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:
5 changes: 2 additions & 3 deletions docs/quick-start/write-data.txt
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions docs/transactions.txt
Original file line number Diff line number Diff line change
@@ -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
<https://learn.mongodb.com/courses/laravel-transactions>`__.

@@ -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 </core/transactions/#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.
6 changes: 3 additions & 3 deletions docs/upgrade.txt
Original file line number Diff line number Diff line change
@@ -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:`<laravel-compatibility>`
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:`<laravel-breaking-changes>` 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
2 changes: 1 addition & 1 deletion docs/usage-examples/deleteMany.txt
Original file line number Diff line number Diff line change
@@ -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.

2 changes: 1 addition & 1 deletion docs/usage-examples/deleteOne.txt
Original file line number Diff line number Diff line change
@@ -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
<https://laravel.com/docs/{+laravel-docs-version+}/eloquent#deleting-models>`__ section of the
Laravel documentation.

2 changes: 1 addition & 1 deletion docs/usage-examples/find.txt
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion docs/usage-examples/findOne.txt
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion docs/usage-examples/updateMany.txt
Original file line number Diff line number Diff line change
@@ -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.

2 changes: 1 addition & 1 deletion docs/usage-examples/updateOne.txt
Original file line number Diff line number Diff line change
@@ -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.

2 changes: 1 addition & 1 deletion docs/user-authentication.txt
Original file line number Diff line number Diff line change
@@ -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: