Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 76817d2

Browse files
committed
Update the README, and the description
1 parent 5575dcf commit 76817d2

File tree

5 files changed

+26
-63
lines changed

5 files changed

+26
-63
lines changed

README.md

Lines changed: 16 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,28 @@
1-
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
1+
# How To Build a Laravel + MongoDB Back End Service
22

3-
<p align="center">
4-
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
5-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
6-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
7-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
8-
</p>
3+
This code was writting in conjunction with [this article](https://www.mongodb.com/developer/languages/php/laravel-mongodb-tutorial/?utm_campaign=devrel).
94

10-
## About Laravel
115

12-
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
6+
## Prerequisites
7+
You'll need the following installed on your computer to follow along with this tutorial:
138

14-
- [Simple, fast routing engine](https://laravel.com/docs/routing).
15-
- [Powerful dependency injection container](https://laravel.com/docs/container).
16-
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
17-
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
18-
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
19-
- [Robust background job processing](https://laravel.com/docs/queues).
20-
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
9+
- A MongoDB Atlas cluster
10+
- [Create a free cluster](https://www.mongodb.com/try?utm_campaign=devrel) and [load the MongoDB sample data](https://www.mongodb.com/basics/sample-database?utm_campaign=devrel).
11+
- A code editor of your choice.
12+
- We suggeest [Visual Studio Code](https://code.visualstudio.com/download). Check the optional [MongoDB for VS Code](https://www.mongodb.com/products/vs-code?utm_campaign=devrel) extension.
2113

22-
Laravel is accessible, powerful, and provides tools required for large, robust applications.
14+
The article mentions several ways to get a Laravel development environment up and running.
2315

24-
## Learning Laravel
16+
## .env file
2517

26-
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
18+
Not included in this repo is the .env file that contains the MongoDB connection string with the username / password. You'll have to make a cope of the .env.example file and add this variable:
2719

28-
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
20+
`DB_URI=`
2921

30-
## Laravel Sponsors
22+
The complete URI looks like this:
3123

32-
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
24+
`DB_URI=mongodb+srv://USERNAME:PASSWORD@clustername.subdomain.mongodb.net/?retryWrites=true&w=majority`
3325

34-
### Premium Partners
26+
# Disclaimer
3527

36-
- **[Vehikl](https://vehikl.com/)**
37-
- **[Tighten Co.](https://tighten.co)**
38-
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
39-
- **[64 Robots](https://64robots.com)**
40-
- **[Cubet Techno Labs](https://cubettech.com)**
41-
- **[Cyber-Duck](https://cyber-duck.co.uk)**
42-
- **[Many](https://www.many.co.uk)**
43-
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
44-
- **[DevSquad](https://devsquad.com)**
45-
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
46-
- **[OP.GG](https://op.gg)**
47-
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
48-
- **[Lendio](https://lendio.com)**
49-
50-
## Contributing
51-
52-
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
53-
54-
## Code of Conduct
55-
56-
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
57-
58-
## Security Vulnerabilities
59-
60-
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
61-
62-
## License
63-
64-
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
28+
Use at your own risk; not a supported MongoDB product

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "laravel/laravel",
33
"type": "project",
4-
"description": "The Laravel Framework.",
4+
"description": "A tutorial to shows how to connect and use Laravel with MongoDB",
55
"keywords": ["framework", "laravel"],
66
"license": "MIT",
77
"require": {
@@ -15,7 +15,7 @@
1515
},
1616
"require-dev": {
1717
"fakerphp/faker": "^1.9.1",
18-
"laravel/sail": "^1.0.1",
18+
"laravel/sail": "^1.23",
1919
"mockery/mockery": "^1.4.4",
2020
"nunomaduro/collision": "^6.1",
2121
"phpunit/phpunit": "^9.5.10",

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
'mongodb' => [
3939
'driver' => 'mongodb',
4040
'dsn' => env('DB_URI'),
41-
'database' => 'bigsearch',
41+
'database' => 'bigsearch', // replace 'bigsearch' with your database name
4242
],
4343

4444
'mongodb_mflix' => [

phpunit.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
<env name="APP_ENV" value="testing"/>
2222
<env name="BCRYPT_ROUNDS" value="4"/>
2323
<env name="CACHE_DRIVER" value="array"/>
24-
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
25-
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
24+
<env name="DB_DATABASE" value="testing"/>
2625
<env name="MAIL_MAILER" value="array"/>
2726
<env name="QUEUE_CONNECTION" value="sync"/>
2827
<env name="SESSION_DRIVER" value="array"/>

0 commit comments

Comments
 (0)