Getting Started with Laravel (PHP Framework) - Models and Data

Storing and fetching data in databases is a key task of all modern web applications. This course teaches you how to easily work with models and data in your Laravel application.
Course info
Rating
(73)
Level
Beginner
Updated
Dec 20, 2016
Duration
2h 22m
Table of contents
Course Overview
Getting Started
Models & Migrations
Database Queries & Seeding Data
Working with Relationships
Managing Data Output
Description
Course info
Rating
(73)
Level
Beginner
Updated
Dec 20, 2016
Duration
2h 22m
Description

It's a core task of modern web application to store, update, retrieve, and delete data in databases. This course, Getting Started with Laravel (PHP Framework) - Models and Data, teaches you how Laravel assists you at this task. You'll learn how to easily set up and configure models as well as database tables through Laravel and PHP. This course also teaches you how you may then easily query your data or set up related models by writing a few lines of code. Once you're finished with this course, you'll be able to implement database capabilities in any of your Laravel applications and therefore make them really dynamic and powerful.

About the author
About the author

Max is a freelance web developer and professional online instructor. Whilst being into development since 15 years of age, he studied Business Administration and worked in major consultancies as well as a bank before making his passion his main job. If not coding, Max enjoys sports, cooking, and meeting people.

More from the author
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone. My name is Maximilian Schwarzmueller, and welcome to my course, Getting Started with Laravel -- Models and Data. I'm a freelance web developer and online instructor with many years of experience working with PHP and Laravel. Working with models and data are key tasks of any modern web application, but writing complex queries, especially when using related models and tables, can quickly become a very difficult task. In this course, we're going to see that Laravel makes that actually very easy. Some of the major topics that we will cover include model and database setup and configuration, all in P or PHP, no SQL knowledge is required, querying the database for both inserting and fetching data without writing any line of SQL code, and setting up and using one-to-many and many-to-many relations between models. By the end of this course, you'll be able to integrate database access and models into all your Laravel projects, and, therefore, create truly dynamic applications. Before beginning the course, you should be familiar with object-oriented PHP programming, and the basics of Laravel. Taking my Laravel Basics course here on Pluralsight may be a good idea. From here, you should feel comfortable diving into PHP and Laravel with courses on advanced Laravel concepts, for example, building a RESTful service with Laravel. I hope you join you me on this journey to learn database access and working with models and data in Laravel apps with the Getting Started with Laravel - Models and Data course at Pluralsight.

Models & Migrations
Welcome to a new module in this course. Now that we learned how we can set up a database connection in the last course module, and that we also saw which project we're going to use throughout this course, it's now time to dive deeper into Laravel models and how they work together with Eloquent, Laravel's object-relational mapping system. We also will have a look at how migrations help us set up our database. So, therefore, in this course module it's all about structuring and using our data with models, and creating a database structure, on the other hand, with migrations.

Database Queries & Seeding Data
Welcome to another module in this course. In the last module, we had a look at how we could configure our database through migrations, and how Laravel database access works in the first place using the Laravel models or the Laravel ORM, Eloquent. In this module, I want to have a look at how we can use our database connection, our models, to now not only have them in there, but also to query our database to write some data to it, or to fetch some data from our database. Additionally, we will have a look at how we can seed our database so that we have some starting data in there. Now when we talk about querying the database, we typically get four different operations. We want to save data, fetch data, update data, or delete data. In the next videos, I'm going to have a look at all of these four typical database actions.

Working with Relationships
Welcome to this fourth course module in this course about working with models and data in a Laravel application. Thus far, we had a look at how we could create models, how we can work them, and how we can query the database through Laravel's Eloquent object, and how we can use all that to work with data in our application. One thing we haven't done, though, all our data right now is basically one model. We're working with the Post model in the course example, and we haven't really learned how we can work with multiple models which are connected. Therefore, in this module, we'll have a look at how we can work with relations between different models, because that, in the end, is what my SQL databases are really great at, depicting and working with connections, with relationships between multiple tables, and therefore, in our Laravel application, multiple models. So, let's dive right into the most important question, what relationships actually are, in the next course lecture.

Managing Data Output
Welcome to the last course module. We'll learn a lot about working with data and models in our Laravel application. We learned how we could structure our data with models, and also bring that structure to our database with migrations and create the appropriate tables there. We also learned which assumptions Laravel has about table naming, and primary keys there. We then also had a look at how we could query the database to not only get the data back, but also write it to the database in the first place or delete it. Well, and since that's only part of the picture, in the last module we learned about relations, which is one of the core strengths of a MySQL database. Relating our different models both on the Laravel side, as well as the database side is a powerful feature of php in general or of Laravel specifically here, of course. Now with all these tools, in this module here, I want to have a close look at how we can manage our data output mostly, but also a bit of how we can manage the input, which means, how can we actually manage the data, the values of the data we're storing in the database, or the main focus of this module we get out of the database. Let's take a close look beginning in the next lecture.