Skip to main content
CF

Mastering Laravel 10 Query Builder, Eloquent & Relationships

7h 27m 32s
English
Paid

Struggle with Laravel data work? You are not alone. In this course, you learn how to use migrations, seeders, factories, the Query Builder, Eloquent, and table relationships. Each tool helps you shape and read your data with less effort. The goal is simple: you learn to handle your database with confidence.

What Laravel Does

Laravel is a PHP framework that helps you build web apps fast. It comes with clear tools for routing, views, and data work. Its data layer runs on Eloquent, an ORM that lets you work with tables as if they were simple classes. You can create, read, update, and delete records with short code. You can also build complex queries without writing raw SQL.

Why Developers Choose Laravel

Laravel stays popular because it feels clean to use. You get built-in tools for data work, queues, tests, and more. You also get a large community that shares packages, guides, and help. This support makes Laravel a steady choice for new and skilled developers. You can start small and build complex apps as you grow.

Who This Course Helps

This course is for you if you know the basics of Laravel and want to go deeper with data. Many people find Eloquent hard at first because it has many features. It also takes time to learn how tables connect through one-to-one, one-to-many, and many-to-many links. In this course, you learn these ideas step by step. You work with clear examples, so each topic feels easier.

Tools Used in the Course

You can use any code editor you like. The course also uses Ray from Spatie and Tinkerwell from BeyondCode. These tools help you view output and test queries fast. They are paid apps, but you do not need them to follow the lessons.

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 93 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 93 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Introduction
All Course Lessons (93)
#Lesson TitleDurationAccess
1
Introduction Demo
01:07
2
Course structure
02:03
3
Source code
00:53
4
Project & database setup
05:39
5
Database configuration file
02:35
6
What are migrations and how do they work?
05:29
7
Creating our first migration
03:41
8
Column modifiers
04:39
9
Running migrations & different options
06:42
10
Squashing migrations
02:34
11
Modifying Columns
03:41
12
Renaming Columns
01:57
13
Migrations Cleanup
00:50
14
Dropping Columns
02:29
15
Factories vs Seeders - What is the difference?
01:16
16
Defining our first Factory
04:37
17
Using a Factory through a Seeder
03:02
18
Using a Factory through Artisan Tinker
01:22
19
Defining our first Seeder
06:47
20
Using a JSON file to read Data for our Seeders
04:15
21
Calling Multiple Seeders
00:56
22
Primary & Foreign Keys
06:20
23
Introduction to the Query Builder
06:29
24
First, Value and Find Methods
03:41
25
Retrieving a List of Column Values
00:45
26
Inserts Through the Query Builder
06:15
27
Insert & Get Id Through the Query Builder
01:21
28
Updating Through the Query Builder
06:37
29
Deleting Through the Query Builder
03:00
30
Aggregates Methods
03:29
31
whereNot & orWhereNot
02:31
32
Determining if Records Exist
01:50
33
whereBetween & whereNotBetween Methods
01:38
34
Debugging Through the Query Builder
01:59
35
Database Transactions
06:10
36
Pessimistic Locking
02:42
37
Chunking Data
02:44
38
Streaming Results Lazily
04:09
39
Raw Methods
03:37
40
Ordering Through the Query Builder
03:51
41
Full Text indexes
05:01
42
Limit & Offset Through the Query Builder
02:40
43
Conditional Clauses
02:16
44
Removing Existing Ordering
01:50
45
Using the paginate() method
08:04
46
Using the simplePaginate() method
01:47
47
Using the cursorPaginate() method
04:19
48
Introduction to Eloquent
04:07
49
Eloquent Model Conventions
13:38
50
The $fillable And $guarded Properties
04:57
51
Building Queries
02:53
52
Retrieving Single Models
08:39
53
Inserting / Creating Models
05:14
54
Retrieving All Models
04:32
55
firstOrCreate & firstOrNew
04:35
56
Updating Models
03:51
57
Attribute Changes [isDirty,В isClean, &В wasChanged]
07:33
58
UpdateOrCreate & Upserting Models
04:16
59
Deleting Models
02:47
60
Soft Deleting Models
05:40
61
Pruning Models
02:44
62
Replicating Models
01:59
63
Global Scopes
07:46
64
Local Scopes
06:04
65
Dynamic Scopes
03:59
66
Using a Trait to store Scopes
02:09
67
What are Relationships?
01:33
68
One to One Relationship
14:15
69
One to Many / Belongs To Relationship
08:05
70
Many to Many Relationship
16:16
71
Eager Loading
02:45
72
Has one Through Relationship
08:25
73
Has One of Many Relationship
06:02
74
Has Many Through Relationship
07:15
75
What are Polymorphic Relationships?
01:18
76
One to One Polymorphic Relationship
10:01
77
One to Many Polymorphic Relationship
09:03
78
One of Many Polymorphic Relationship
02:42
79
Many to Many Polymorphic Relationship
07:01
80
Project Setup
01:54
81
Installing Laravel Breeze
03:18
82
Defining Migrations
08:31
83
Defining Models / Relationships
05:46
84
Creating Models, Controllers, Factories & Migrations
01:50
85
Inserting Data Using Factories & Seeders
09:59
86
Setting up Article Routes
04:14
87
Setting up The Frontend Pages
03:04
88
The index() Method
08:49
89
The show() Method
09:50
90
The create() & store() Methods
16:47
91
The edit() & update() Methods
12:20
92
The destroy() method
02:44
93
Using Policies For Unauthorized Users
04:43
Unlock unlimited learning

Get instant access to all 92 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What prerequisites are needed before enrolling in this course?
Before enrolling in this course, you should have a basic understanding of Laravel. This includes familiarity with its general structure and how to set up a Laravel project. Basic knowledge of PHP and database concepts is also recommended, as the course dives deep into Laravel's data handling features like Eloquent and the Query Builder.
What projects or exercises will I work on during the course?
Throughout the course, you'll engage in hands-on exercises including setting up a project and database, creating and running migrations, and using factories and seeders to populate your database. You will also build and manage complex queries using the Query Builder and Eloquent to handle data relationships and transactions.
Who is the target audience for this course?
This course is designed for developers who are already familiar with the basics of Laravel and want to advance their skills in managing data. It's particularly useful for those who find Eloquent challenging and wish to understand database relationships and advanced querying techniques in a step-by-step manner with practical examples.
How does the depth of this course compare to other Laravel courses?
This course offers a focused exploration of Laravel's data management capabilities, particularly Eloquent, Query Builder, and database relationships. Unlike broader Laravel courses, this one zeroes in on working with data, providing detailed lessons on migrations, seeders, and complex queries, which are typically covered superficially elsewhere.
What specific tooling or platforms will be used in this course?
The course makes extensive use of Laravel's built-in tools such as migrations, seeders, and factories. It also covers the use of Artisan Tinker for testing seeders. While you can use any code editor of your choice, the course focuses primarily on Laravel's ecosystem for data handling.
What topics or tools are not covered in this course?
The course does not cover front-end development or the use of Laravel beyond its data management capabilities. Topics such as routing, views, and Laravel Mix are not included. The emphasis is strictly on database interactions, migrations, and Eloquent ORM specifics.
How can the skills learned in this course be applied to other areas or careers?
The skills acquired in this course, such as managing database relationships and building efficient queries with Eloquent and the Query Builder, are valuable in any web development career. Mastery of these tools can significantly improve your ability to build scalable and efficient web applications, making you a more competitive candidate for backend or full-stack development roles.