Print JavaScript/Vue object to console

str = JSON.stringify(media, null, 2); // it will also indent the output...

My most popular blog posts 2020

These last years I have been using my blog as a kind of public notebook. If there is a problem and I find the solution, I usually make a post...

Datalist, autosuggestions without JavaScript

I love that browsers get more and more native controls so that we developers don’t have to worry about JavaScript libraries. Autocompletion is a pattern that all web users are...

Laravel rate limiter does not limit

While trying out Laravel 8 and the new rate limiter, I could not get it to work on my developer machine. It turns out that the rate limiting mechanism is...

Flatten Eloquent collection to array with key and value

If you have a result from Eloquent which is a collection where every value is on it’s own row, you can use mayWithKey() create an array in a specific...