8:20 i think you need to clarify this wording, because "responsible" dev should always include fillable, right? i know what you mean is if you can be responsible in developing without fillable, than you can remove that. But I am afraid that someone might miss interpreted it to be recomendation
weird, without any strict mode, when you create a model, it store the fillable fields only, even you provide many fields in the create(), i can't trigger your first error
It's good to hear Jeffrey's voice after so many years. I started working with Laravel back in 2014 and his tutorials really helped me to understand everything. Thanks for those days.
I think in real use-case, nobody writes laravel code like this. They hardly use blade engine and database queries are usually written not using eloquent. I would even say that for new projects its best to NOT do such proprietary laravel things so that other developers can also work without stress who aren't laravel experts. Sure does look pretty though.
Oh yeah, I have seen my fair share of Laravel applications which came to me from some feature addition or upgradation written completely using vanilla php styled views and using raw SQL queries. I outrightly reject the offer of that work.
@@jeffreyway520 I get what you are saying but there is a reason why you need a sharp knife, there is no need for unguarded. But I prefer explicitness in my code. I even type everything and turn on explicit types.
Lovely tips! Thank you! I tried to enable preventAccessingMissingAttributes, but it is throwing an exception when I try to access count of a relationship. Let's say I have $posts = Post::withCount('comments')->get(); and inside the blade, I try to access it like $post->comments_count. Right there, it throws the exception. Any thoughts?
The way Jefferey explains things, the clarity is awesome🎉🎉🎉
Like a boss!! This feature should be enabled by default!
What editor is that?
8:20 i think you need to clarify this wording, because "responsible" dev should always include fillable, right?
i know what you mean is if you can be responsible in developing without fillable, than you can remove that. But I am afraid that someone might miss interpreted it to be recomendation
10:51 yeah that's when the magic happened 💫
Can you tell me, how you setup your IDE
weird, without any strict mode, when you create a model, it store the fillable fields only, even you provide many fields in the create(),
i can't trigger your first error
Very clear explanation of Laravel Strict Mode. Thanks Jeffrey
I have watched hundreds of tutorials from you but never saw your face. Why does it always feel weird when that happens 😂
is it really ok to unguard? imagine the time we save for protected $fillable 🤣
As long as you don't blindly pass request()->all() to Eloquent, you should be perfectly fine.
@@Laracastsofficial finally I just got an answer of a question which has been spinning in my head for weeks!
Thank you, Jeffrey Way!
Good points.
Maybe need to create a new course for Laravel tips and tricks.
It's good to hear Jeffrey's voice after so many years. I started working with Laravel back in 2014 and his tutorials really helped me to understand everything. Thanks for those days.
So much information into 11 minutes 18 seconds and it didn't in anyway feel overwhelming. Great work
I'm so glad that you made this video ❤
I overlooked this option so far and was missing it. This makes my developer life so much easier. Thanks a lot!
My strict mode is to not use PHP like some sort of peasant.
This should be a boolean toggle in the .env.
great vidoe. time to upgrade my laravel
the ICONIC voice of LARAVEL!!
Long time no see you brother.
i want to know what is your editor?
Wow this is so cool
Thank you!
Wow, Just WOWWWWW
I think in real use-case, nobody writes laravel code like this. They hardly use blade engine and database queries are usually written not using eloquent. I would even say that for new projects its best to NOT do such proprietary laravel things so that other developers can also work without stress who aren't laravel experts. Sure does look pretty though.
You think developers aren't using Blade and writing database queries with Eloquent?? That's very much untrue.
Oh yeah, I have seen my fair share of Laravel applications which came to me from some feature addition or upgradation written completely using vanilla php styled views and using raw SQL queries. I outrightly reject the offer of that work.
First of all, the alias trick got me... never thought about creating such an alias... Good stuff
Awesome!!! dude, even when english is not my native language I can understand your explatanation very well. U rock!
Супер, дякую!
Nice vid :). what's the configuration of your phpstorm? how can u see open files in a central drop down menu? it looks very nice
Awesome 👏🏾
🤯 preventLazyLoad is just amazing.
Awesome information! I need to start using this. Good to know what this does and how it works. Thank you!
You made my weekend more awesome. Thanks..😇
Love the intro !! Not ridiculous at all ^^'
`Model::unguard()` is a bad idea.
It's an incredibly common practice. You gotta back up strong statements like that with reasoning.
When u use inertia few off them never going to happen
NOICE!
Awesome thanks
Awesome.
what is your diet? wow
Nice
Laravel is beautiful
Wow!!!
Intro😂😍🤣
It's amazing!
should be strict 😂
WOW ... 👏👏👏
Amazing
Great video!
omg very cool, but i think unguard is very dangers
It’s no more dangerous than a sharp knife.
@@jeffreyway520 I get what you are saying but there is a reason why you need a sharp knife, there is no need for unguarded. But I prefer explicitness in my code. I even type everything and turn on explicit types.
Lovely tips! Thank you! I tried to enable preventAccessingMissingAttributes, but it is throwing an exception when I try to access count of a relationship. Let's say I have $posts = Post::withCount('comments')->get(); and inside the blade, I try to access it like $post->comments_count. Right there, it throws the exception. Any thoughts?
Very nice and useful !