🔥 Have you heard of the 'onbeforeunload' event?
When a user clicks back, you can use onbeforeunload to prompt the user. Returning a value will change the default message in the popup.
Great for sites that handle a lot of data input!
👨🔧 Finally got sick of seeing this error when pushing new branches. Turns out a simple config option allows `git push` to do the heavy lifting. Why is this not the default?!
Do yourself a favour 👇 https://t.co/hBJa5JJbIm
#Laravel tip of the day: how to calculate the sum of ALL records, if you only have a PAGINATED collection? You calculate sum BEFORE the pagination, but from the same query. https://t.co/lpPps70Vqs
When registering routes, you may limit the possible values for a route parameter. In this way you may change your response based on a valid parameter, having an expressive route and not a Query string parameter. @laravelphp @laravelnews https://t.co/3e1AzXVKCu
TIL you can center things in CSS grid with a single property now
💡 on @laravelphp @LaravelLivewire you can fire global events from the Component class to communicate between other livewire components, or event, @Alpine_JS components: https://t.co/sXlAInB0ct
Ever notice how anchor links butt right up against an element? Or worse, end up behind a sticky header?
The scroll-margin CSS property lets you customize this by setting your own scroll "snap area". 🪄