All entries of my technical and business blog.

Idea - Quick API Proxy service

I have a long history of sharing ideas on this blog for services/sites/utilities. Here’s the newest one: a very cheap service to proxy API requests that don’t have open CORS requests / require an API key. (more…)

Be careful with prepareForValidation in Laravel

The prepareForValidation() method is really useful in Laravel requests: it helps modify the incoming data so that validation might be easier. But you need to be careful that you implement it correctly and don’t mess up your data. Let me explain. (more…)

Use Netlify functions to proxy an API without CORS

You’ve got a great idea, there’s a free API, and you’ve got free hosting on Netlify. You’re ready to begin. You request your first bit of data and you hit that infamous CORS error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://some-url-here. Ahh! So now, you have to build a complex backend to deal with this. Or do you? If it’s just something simple, you can use Netlify’s functions... (more…)

Your team isn't the only special one

I was watching Bar Rescue (please don’t tell anyone) and a bartender said exactly the same thing about his job as a programmer I was just talking to… turns out they had a surprising thing in common. (more…)

Do you even sprintf?

“Do you even lift, bro?!” What a way to ask if you work out while simultaneously insulting you. Well, maybe I shouldn’t have named this “do you even sprintf” but it really surprises me how many PHP devs forget about (or don’t even know about) this useful tool - and instead do some pretty icky looking string concatenation. Let’s take a look at what sprintf() can do for us. (more…)


Use Traits in Laravel in Policies

I love using Policies in Laravel. A particularly useful feature is the interception of checks. But what if only some of our policies need that? That’s where we can judiciously use traits. (more…)

⬅ Newer | Older ➡
Page 1 of 64