Man, that so cool to see how people get dive into Laravel community. Welcome , intersting to watch and also learn something new , keep it up. Wanna see video about testing :)
I'm so glad I discovered this channel because I've been looking for a Laravel related content just like this one for *years*! And I also appreciate you showing the actual code you run on production (even though it's/was a little ugly lol, these are our babies!) Also what extension are you using to show syntax errors on the IDE? That seems very useful
@@samldev thanks, although i've been using intelephense (free) for years and it never changed the way errors are displayed in the IDE, not sure if it's a PRO feature specifically in case someone else is interested i just managed to find a plugin from a development pack to achieve the exact same behavior called "Error Lens". It also seems to be language server agnostic so it works outside the php scope too btw appreciate the availability :D
Ha I was trying to decide how to make a video on Dusk testing. Since it’s new to me it’d be difficult to “do it live”, but I could figure it out then either reimplement it for a video or just walk through what I did. Any thoughts which you would prefer?
@@samldev Walking through the code is fine for me. It depends if you want to make it a tutorial or an overview type of video. Totoriel will be longer and more beginner-friendly. You have more statistics to make this decision either way, I will watch it.
You should use JSON Resource. Only query and pass the data you need in the controller. Also passing the entire user model to inertia isn’t a good idea. I assume you may just be starting out with Laravel, good luck 👍
I can vouch for Json resources, it gives you so much control and using whenLoaded gives you so much clarity on when you're having an N+1 query because the data won't show. Ofc just use debugbar, but still Json resource are amazing. Also the whenLoaded method is used to just not show the data when you don't have or want to.
@@relaxationtube2388 hm I don’t think so. How would they see every other users email? I am not passing all users to the front end, only the currently authenticated user
well, taylor fix it with new method called chaperone(), just define it on the has* method but it will released on Q4 2024 1:53 also stop show off those colourfull eyes xD
It's fine. I enjoyed the format. Don't need to know what all the code looks like. I guess it's more intermediate to advanced than beginner but there's plenty of beginner content out there for people who want more hand holding.
Here's a comment for the algorithm gods.
Man, that so cool to see how people get dive into Laravel community. Welcome , intersting to watch and also learn something new , keep it up. Wanna see video about testing :)
I'm so glad I discovered this channel because I've been looking for a Laravel related content just like this one for *years*! And I also appreciate you showing the actual code you run on production (even though it's/was a little ugly lol, these are our babies!)
Also what extension are you using to show syntax errors on the IDE? That seems very useful
I’m using PHP Intelephense but the Laravel team is releasing an official VS Code extension sometime this year which I’m pumped for!
Good content. Thanks for sharing!
Hey sorry, what's the extension that shows you error messages inline like at 12:09?
Intelephense but Laravel has an official vs code extension coming soon 🔜
@@samldev thanks, although i've been using intelephense (free) for years and it never changed the way errors are displayed in the IDE, not sure if it's a PRO feature specifically
in case someone else is interested i just managed to find a plugin from a development pack to achieve the exact same behavior called "Error Lens". It also seems to be language server agnostic so it works outside the php scope too
btw appreciate the availability :D
You don't have to manually go through your app to make sure your change didn't break anything - there're automated test exactly serve this purpose.
I mentioned that in the video 😁
@@samldev You can even make a video about it 👀
Ha I was trying to decide how to make a video on Dusk testing. Since it’s new to me it’d be difficult to “do it live”, but I could figure it out then either reimplement it for a video or just walk through what I did. Any thoughts which you would prefer?
@@samldev Walking through the code is fine for me. It depends if you want to make it a tutorial or an overview type of video. Totoriel will be longer and more beginner-friendly. You have more statistics to make this decision either way, I will watch it.
You should use JSON Resource. Only query and pass the data you need in the controller. Also passing the entire user model to inertia isn’t a good idea. I assume you may just be starting out with Laravel, good luck 👍
I use the $hidden attribute on my user model to control what gets sent to the client. But I am fairly new to Laravel yes!
I can vouch for Json resources, it gives you so much control and using whenLoaded gives you so much clarity on when you're having an N+1 query because the data won't show.
Ofc just use debugbar, but still Json resource are amazing.
Also the whenLoaded method is used to just not show the data when you don't have or want to.
@@samldev that’s not enough, for instance, every user will see every other user’s email. In a UserResource you could use the when method to prevent it
@@relaxationtube2388 hm I don’t think so. How would they see every other users email? I am not passing all users to the front end, only the currently authenticated user
hi @samldev what too was used to check the queries?
laravel debug bar by barryvdh github.com/barryvdh/laravel-debugbar
It's called Laravel debugbar, you can install it by running this command in your project directory :
composer require barryvdh/laravel-debugbar --dev
Nice optimization tip
It's very useful tips 👍
well, taylor fix it with new method called chaperone(), just define it on the has* method
but it will released on Q4 2024
1:53 also stop show off those colourfull eyes xD
generally $with is not a good idea. so is appends.
I prefer loading data when and only when it's required..
jesus lord what an irritating intro.... click, click, click
Haha yeah I didn’t know how else to demonstrate the delay between clicking and loading 🤷♂️
It's fine. I enjoyed the format. Don't need to know what all the code looks like. I guess it's more intermediate to advanced than beginner but there's plenty of beginner content out there for people who want more hand holding.