Sandro Gehri
banner
sandro.gehri.dev
Sandro Gehri
@sandro.gehri.dev
Father, Husband, Laravel enthusiast and OpenSource Developer.
Creator of OpenAI for PHP and TailwindMerge for Laravel.
Probably most developers haven‘t realized the behaviour because HTML ignores leading and trailing spaces in most cases.

The reason I realized it was a JS library not able to render strings with a leading whitespace. 😅
December 7, 2024 at 6:44 AM
Livewire disables the TrimStrings middleware for all its requests: github.com/livewire/liv...

Maybe something for Filament v4 to trim all text input values by default?
Probably not possible in v3 as it is a breaking change under special conditions.
livewire/src/Mechanisms/HandleRequests/HandleRequests.php at main · livewire/livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs. - livewire/livewire
github.com
December 6, 2024 at 3:12 PM
Maybe this is a problem in my application.

I will give it a try in a fresh installation and let you know.
December 6, 2024 at 2:59 PM
Right, but I hesistated to have this right from the beginning on all my text inputs becauce of possible side effects.

Maybe this is something Filament could support out of the box?
December 6, 2024 at 2:39 PM
Maybe I should have mentioned, that I send log entries with a level of "error" of higher to Flare: 😅

flareapp.io/docs/integra...
Sending logs to Flare - Documentation
The best error tracker for Laravel
flareapp.io
December 6, 2024 at 8:10 AM
I always unguard(). 💯

In my opinion fillables only work in really simple apps. As soon as you have users with different permissions, fillable isn‘t the right choice anymore.

And to not get confused when switching projects I always unguard the models and use proper validation everywhere.
December 4, 2024 at 7:04 PM
Done.
November 30, 2024 at 10:02 AM
The video of the talk will be available on Youtube.
November 26, 2024 at 9:12 AM