When to use Laravel global scopesLaravel global scopes are great, but I don't see them used a lot. Instead, I see a lot of local scopes being used to achieve the same thing. With proper implementation of global scopes, the code and security would be greatly improved. Let me illustra...2SMFeb 20, 2023 · 4 min readstefrouschop.nl
How to secure model ID’s in Livewire and why this is importantTL;DR There is a way to protect your public properties in Livewire 2 in the way it will work in the upcoming Livewire 3. There is a Trait at the end of the article you can use for this. Why should you protect model ID's in Livewire Livewire is great!...3RBFeb 5, 2023 · 5 min readstefrouschop.nl
Make changes to the database during a Livewire Pest chainTests Tests are great! They're probably the reason why you're still able to sleep at night after someone decided you had to make some last minute changes. Also, they really speed up your development. Imagine working on a piece of code that has a lot ...Nov 5, 2022 · 3 min readstefrouschop.nl
How to keep line breaks in user input without unescaping it in LaravelThe problem I recently got a question from a client about disappearing line breaks. It was a valid question since the text came from a textarea input that was echoed out on a page. The type of content was really simple and had no need for markup, so ...2MSMay 28, 2022 · 3 min readstefrouschop.nl
On-demand Xdebug with PHPUnit and Laravel in PhpStormOn-demand Xdebug with PHPUnit and Laravel in PhpStorm TLDR; This guide will make you install Xdebug on your Mac without the performance downsides, but still being able to use all the Xdebug goodnesses. Most Xdebug setups only allow you to use it thr...Nov 21, 2018stefrouschop.nl