-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOCSP-37618: Usage Examples landing page (#2767)
* DOCSP-37618: Usage Examples landing page * fix refs * update TOC * format fix * CC feedback * remove info * add back * typo * CC feedback 2 * add section toc * feedback, removing tabs * workflow file * edits * fix * more CC feedback * run -> use * changes to running instructions * turn back into steps * small fixes * more reworking * reword * reworking * feedback * newline * remove file * edits * fix
- Loading branch information
Showing
3 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.. laravel-quick-start-view-data: | ||
.. _laravel-quick-start-view-data: | ||
|
||
================= | ||
View MongoDB Data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
.. _laravel-usage-examples: | ||
|
||
============== | ||
Usage Examples | ||
============== | ||
|
||
.. facet:: | ||
:name: genre | ||
:values: reference | ||
|
||
.. meta:: | ||
:keywords: set up, runnable | ||
|
||
.. contents:: On this page | ||
:local: | ||
:backlinks: none | ||
:depth: 2 | ||
:class: singlecol | ||
|
||
Overview | ||
-------- | ||
|
||
Usage examples show runnable code examples to demonstrate frequently used MongoDB | ||
operations. Each usage example includes the following components: | ||
|
||
- Explanation of the MongoDB operation | ||
- Example code that you can run from an application controller | ||
- Output displayed by the print statement | ||
|
||
How to Use the Usage Examples | ||
----------------------------- | ||
|
||
To learn how to add a usage example to your Laravel application and view the expected output, | ||
see the following sections: | ||
|
||
- :ref:`before-start` | ||
- :ref:`run-usage-examples` | ||
|
||
.. _before-start: | ||
|
||
Before You Get Started | ||
~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
You can run the usage examples from your own Laravel application or from the | ||
``{+quickstart-app-name+}`` application created in the :ref:`laravel-quick-start` guide. | ||
|
||
The usage examples are designed to run operations on a MongoDB deployment that contains | ||
the MongoDB Atlas sample datasets. Before running the usage examples, ensure that you load | ||
the sample data into the MongoDB cluster to which your application connects. Otherwise, the | ||
operation output might not match the text included in the ``{+code-output-label+}`` tab of | ||
the usage example page. | ||
|
||
.. tip:: | ||
|
||
For instructions on loading the sample data into a MongoDB cluster, see | ||
:atlas:`Load Sample Data </sample-data>` in the Atlas documentation. | ||
|
||
.. _run-usage-examples: | ||
|
||
Run the Usage Example | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Each usage example page includes sample code that demonstrates a MongoDB operation and prints | ||
a result. To run the operation, you can copy the sample code to a controller endpoint in your | ||
Laravel application. | ||
|
||
To view the expected output of the operation, you can add a web route to your application that | ||
calls the controller function and returns the result to a web interface. |
9a616f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@norareidy You can reword the commit message when merging. The list of commit messages is not meaningful.