Tutorials for eloquent
-
Course: Eloquent: The Expert Level
The no.1 topic of Laravel-related questions I get is about Eloquent. How to query X? What's the bes...
-
Course: Better Eloquent Performance
When it comes to slow Laravel applications or websites, by far the most "popular" cause is...
-
· 14 mins, 2744 words · premium
Tutorial: Optimizing Laravel Eloquent and DB Speed: All You Need to Know
-
September 21, 2021 · 7:58
Eloquent Performance: TOP 3 Mistakes Developers Make
-
February 02, 2021 · 5:47
Eloquent or Query Builder: When to Use Which?
-
October 13, 2021 · 10:56
Eloquent Soft Deletes: Things You May Not Know
-
July 30, 2020 · 6:30
What SQL Queries Are "Under" Eloquent?
-
November 14, 2021 · 5:31
Improve Controller: Shorter Eloquent with When()
-
· 14 mins, 2724 words · premium
Tutorial: 20+ Best Laravel Eloquent Packages
-
· Updated Aug 2022 · 3 mins, 454 words
Tutorial: Eloquent: Recursive hasMany Relationship with Unlimited Subcategories
-
· Updated Aug 2022 · 2 mins, 372 words
Tutorial: AND-OR-AND + brackets with Eloquent
-
Random Quick Laravel Tip:
Eloquent scopes inside of other relationshipsDid you know that you can use Eloquent scopes inside of defining other relationships?
app/Models/Lesson.php:
1public function scopePublished($query)2{3 return $query->where('is_published', true);4}app/Models/Course.php:
1public function lessons(): HasMany2{3 return $this->hasMany(Lesson::class);4}56public function publishedLessons(): HasMany7{8 return $this->lessons()->published();9} -
Package: JosephSilber/bouncer
Elegant, framework-agnostic approach to managing roles and abilities for any app using Eloquent models
-
Package: spatie/laravel-medialibrary
This package can associate all sorts of files with Eloquent models
-
Package: spatie/laravel-query-builder
Filter, sort and include eloquent relations based on a request.
-
April 17, 2020 · 5:31
Laravel Queries: Group AND-OR Conditions to Avoid Errors
-
June 09, 2022 · 4:58
Laravel - Split Users DB Table: Why It's (Not) Bad?
-
· Updated Aug 2022 · 2 mins, 335 words
Tutorial: Eloquent::when(): No More if-elses for Conditional Queries
-
· 2 mins, 319 words
Tutorial: Eloquent create() VS Query Builder insert() Method
-
· 2 mins, 238 words
Tutorial: Eloquent hasManyThrough: jumping deeper into relationships
-
· Updated Aug 2022 · 2 mins, 234 words
Tutorial: Eloquent date filtering: whereDate() and other methods
-
· 1 min, 146 words
Tutorial: Eloquent: Get the Latest Row from Relationship
-
Package: calebporzio/sushi
Eloquent's missing "array" driver. Sometimes you want to use Eloquent, but without dealing with a database.
-
Package: calebporzio/parental
Brings STI (Single Table Inheritance) capabilities to Eloquent.
-
Package: cviebrock/eloquent-sluggable
Easy creation of slugs for your Eloquent models in Laravel.
-
Package: spatie/laravel-sluggable
Generate slugs when saving Eloquent models
-
Package: staudenmeir/eloquent-has-many-deep
This extended version of HasManyThrough allows relationships with unlimited intermediate models.
-
Package: spatie/eloquent-sortable
Sortable behaviour for Eloquent models
-
Package: spatie/laravel-searchable
Pragmatically search through models and other sources