No video

Eloquent where(): 6 "Tricks" You May Not Know

  Рет қаралды 10,517

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер: 14
@fanievdm1
@fanievdm1 3 ай бұрын
Thanks for the tips. One tends to do the 'old stuff' instead of enhancing your code. The tips are very helpful.
@chlouis-girardot
@chlouis-girardot 3 ай бұрын
Such valuable information/reminders, thank you (again) Sir! 🙏
@LoganathanNatarajanlogudotcom
@LoganathanNatarajanlogudotcom 3 ай бұрын
Thanks for the detailed explanation..
@SebastianMares
@SebastianMares 3 ай бұрын
One thing I cannot stress enough is orWhere with scopes or relations. Always use a callback for your orWhere statements. $author->posts()->where('foo', 'bar') will give you all posts belonging to the author where foo is 'bar', but $author->posts()->where('foo', 'bar')->orWhere('abc', 'xyz') will no longer have abc = 'xyz' scoped to the $author. Same goes with scopes. $builder->where('created_at', '', 500); will probalby also not yield what you were expecting.
@maxzak5310
@maxzak5310 3 ай бұрын
i like whereAll , whereAny ... very handy
@asfiaaiman3699
@asfiaaiman3699 3 ай бұрын
Thanks for these useful tips
@muhammadumarsotvoldiev8768
@muhammadumarsotvoldiev8768 3 ай бұрын
Thank you very much!
@SXsoft99
@SXsoft99 3 ай бұрын
what i always tell people "read the docs". I get it if you come from other frameworks it's a pain
@NitishKumarPatra
@NitishKumarPatra 3 ай бұрын
I didn't get the info about created_at won't work if there is a index on it, and would work then index is created with date ?? Could you please make a video on it ? Such conditions are commonly used throughout projects, but i guess many are unaware, including me.
@LaravelDaily
@LaravelDaily 3 ай бұрын
I mean you need to create an index on DATE(created_at) and not created_at, not sure it needs a video
@BBB888BBB
@BBB888BBB 3 ай бұрын
would you please explain why the word(data) is put in page.jsx when using inertia ? example : to loop : projects.data.map(project).... i saw this and i don't know why . ( in working laravel with react inertia) i saw that .
@LaravelDaily
@LaravelDaily 3 ай бұрын
From what I remember, it's how Laravel API resources return the data by default. Read the docs of Eloquent API resources.
@fredchess
@fredchess 3 ай бұрын
Please what do you use to make quick printing like this?
@LaravelDaily
@LaravelDaily 3 ай бұрын
Tinkerwell
18 Laravel/PHP Tips in 10 Minutes: June 2024
10:41
Laravel Daily
Рет қаралды 9 М.
Eloquent Performance Challenge: My Solution Version
9:57
Laravel Daily
Рет қаралды 19 М.
КАКУЮ ДВЕРЬ ВЫБРАТЬ? 😂 #Shorts
00:45
НУБАСТЕР
Рет қаралды 3,1 МЛН
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 66 МЛН
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 43 МЛН
Livewire or Vue.js: Which to Use When?
12:13
Laravel Daily
Рет қаралды 14 М.
I Was Wrong About React Router.
19:06
Theo - t3․gg
Рет қаралды 59 М.
Using HTMX and FastHTML: Build Your First App in Python
6:23
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 139 М.
Laravel Pennant: first-party feature flags
14:21
Aaron Francis
Рет қаралды 17 М.
MVVM vs. MVI - Understand the Difference Once and for All
18:40
Philipp Lackner
Рет қаралды 38 М.
14 Quick Laravel Tips in 9 Minutes: May 2024
9:09
Laravel Daily
Рет қаралды 10 М.
Laravel Octane: supercharge your Laravel applications
8:34
Aaron Francis
Рет қаралды 38 М.
Laravel's New Strict Mode (Everything You Need to Know)
11:19
Laracasts
Рет қаралды 32 М.
COMPUTER SCIENCE explained in 17 Minutes
16:49
Wacky Science
Рет қаралды 882 М.