Newest content
-
· 6 mins, 1065 words
From Google+ API to Google Sign In with Laravel Socialite
-
· 2 mins, 371 words
Eloquent Trick: Group By Raw with Boolean Condition
-
Random Quick Laravel Tip:
Filter hasMany relationshipsJust a code example from my project, showing the possibility of filtering hasMany relationships.
TagTypes -> hasMany Tags -> hasMany Examples
And you wanna query all the types, with their tags, but only those that have examples, ordering by most examples.
1$tag_types = TagType::with(['tags' => function ($query) {2 $query->has('examples')3 ->withCount('examples')4 ->orderBy('examples_count', 'desc');5 }])->get(); -
· 2 mins, 257 words
Laravel Validation: Specify Attribute Names for Error Messages
-
· 3 mins, 590 words
How to Ban/Suspend Users in Laravel Project
-
· 3 mins, 501 words
5 Less-Known Features of Spatie Media Library
-
Premium Course: Laravel Testing For Beginners: PHPUnit, Pest, TDD
-
· 2 mins, 225 words
Laravel Route Filtering with Regular Expressions
-
· 1 min, 42 words
Laravel Wink Package: WordPress Mini-Alternative for Laravel?
-
· Updated Aug 2022 · 10 mins, 1906 words
Laravel API Errors and Exceptions: How to Return Responses
-
· 1 min, 186 words
Route Fallback: If No Other Route is Matched
-
· 1 min, 41 words
EloquentFilter Package Review: Process GET Query Without IF Statements