|
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 |
2 | 2 |
|
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). |
9 | 4 |
|
10 | | -## About Laravel |
11 | 5 |
|
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: |
13 | 8 |
|
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. |
21 | 13 |
|
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. |
23 | 15 |
|
24 | | -## Learning Laravel |
| 16 | +## .env file |
25 | 17 |
|
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: |
27 | 19 |
|
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=` |
29 | 21 |
|
30 | | -## Laravel Sponsors |
| 22 | +The complete URI looks like this: |
31 | 23 |
|
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` |
33 | 25 |
|
34 | | -### Premium Partners |
| 26 | +# Disclaimer |
35 | 27 |
|
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 |
0 commit comments