-
Notifications
You must be signed in to change notification settings - Fork 1.5k
DOCSP-37618: Usage Examples landing page #2767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
norareidy
merged 28 commits into
mongodb:4.1
from
norareidy:DOCSP-37618-usage-ex-landing
Apr 3, 2024
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
44a0f86
DOCSP-37618: Usage Examples landing page
norareidy afc83e1
fix refs
norareidy f97fbb3
update TOC
norareidy 79a19c0
format fix
norareidy 6edfb45
CC feedback
norareidy 2885cc5
remove info
norareidy 301ff74
add back
norareidy f08b2be
typo
norareidy e3af41b
CC feedback 2
norareidy 6b0e08f
Merge remote-tracking branch 'upstream/4.1' into DOCSP-37618-usage-ex…
norareidy fc7970d
add section toc
norareidy 9034064
feedback, removing tabs
norareidy ab90497
workflow file
norareidy 9e0b2dc
edits
norareidy 7544220
fix
norareidy fdca1ba
more CC feedback
norareidy 7aa61f9
run -> use
norareidy 8c3905c
changes to running instructions
norareidy 245412f
turn back into steps
norareidy e92f51b
small fixes
norareidy 2fe5eb9
more reworking
norareidy 9faa171
reword
norareidy d2d9c9c
reworking
norareidy 7ad6bdc
feedback
norareidy 27dd0dd
newline
norareidy 9912b50
remove file
norareidy 64afec5
edits
norareidy fc06d29
fix
norareidy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.