I'm Daniel Naxon, full-stack developer from Tel Aviv, Israel.
My main tech stack includes PHP, Laravel, AlpineJS, VueJS & TailwindCSS.
Other than the tech-stuff, I'm a big Basketball fan, Maccabi Tel Aviv in particular.
Laravel
I needed to display only the first picture from my Product's model media collection and found my app running five queries and hydrating 16 models with only four products to display 😱 . Here's how I ended with only two queries and eight models.
Product
Laravel provides great functionality for working with uploaded files. But what happens when you need to upload a file from a url rather than from a user's computer? I turns out to be pretty simple.
Ever needed to apply filters on a query conditionally, only when the user actually applies them? Laravel query builder's method when got you covered.
when