Join Joseph Lowery for an in-depth discussion in this video Making the database connection, part of Laravel 4 Essential Training.
- A tremendous number of web apps…are heavily dependent on a database.…A fact that Laravel reccognizes with its support…of a very robust database development system.…In this lesson, we'll start our exploration of that system…by establishing a connection to a database.…First, for Laravel to connect to a database…there has to be one created.…So I'm gonna switch over to my browser…where I have phpMyAdmin installed…and I'm ready to log into it.…And once I log in, switch to the databases tab…and I'm going to create a new database.…
So I'll enter in newapp, as the name of my database…and click Create.…That's all we need to do, we'll handle all the rest…building out the tables, etc. in Laravel itself.…So back to the code editor where our Laravel project…waits for us.…All database connections for your Laravel projects…are handled via a file found in the appconfig folder,…that is called database.php.…Up top there are a number of configurable options.…On line 16, we see how you can set the syntax…for how you get or fetch your data.…
Need a quick dive into Laravel? Check out this short primer, Up and Running with Laravel.
- Installing Laravel and Composer
- Routing requests
- Filtering routes
- Incorporating advanced controllers
- Creating a basic Blade template
- Developing a layout with child pages and forms
- Integrating a database
- Creating tables via migrations
- Outputting data
- Building a Laravel app
- Authenticating users
- Deploying Laravel code
Skill Level Intermediate
Q: In the "Installing Laravel" video, the author provides instructions for changing permissions on the web server directory, as well as setting up a new project and cd-ing to the new app directory, using commands on a Mac. What commands do I type in Windows?
1. Introduction to Laravel
2. Fundamental Laravel Concepts
3. Outputting Laravel Code
4. Integrating Databases
5. Querying Data with Eloquent ORM
6. Building a Laravel App
7. Deploying Your Laravel Code
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.