Thanks for the tips. One tends to do the 'old stuff' instead of enhancing your code. The tips are very helpful.
@chlouis-girardot3 ай бұрын
Such valuable information/reminders, thank you (again) Sir! 🙏
@LoganathanNatarajanlogudotcom3 ай бұрын
Thanks for the detailed explanation..
@SebastianMares3 ай бұрын
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.
@maxzak53103 ай бұрын
i like whereAll , whereAny ... very handy
@asfiaaiman36993 ай бұрын
Thanks for these useful tips
@muhammadumarsotvoldiev87683 ай бұрын
Thank you very much!
@SXsoft993 ай бұрын
what i always tell people "read the docs". I get it if you come from other frameworks it's a pain
@NitishKumarPatra3 ай бұрын
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.
@LaravelDaily3 ай бұрын
I mean you need to create an index on DATE(created_at) and not created_at, not sure it needs a video
@BBB888BBB3 ай бұрын
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 .
@LaravelDaily3 ай бұрын
From what I remember, it's how Laravel API resources return the data by default. Read the docs of Eloquent API resources.
@fredchess3 ай бұрын
Please what do you use to make quick printing like this?