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...

MySQL and sorting umlauts like Swedish åäö

utf8_general_ci will sort Ö with O and you should use the utf8_swedish_ci instead. That will have the correct sorting order, which (IIRC) is that ÅÄÖ go to the end of...

Troubleshoot downloads

Most libraries like PHPSpreadSheet seems to use PHP buffer. And depending on your PHP configuration some warnings or errors could interfer with the output. Let’s examine the output before...

Laravel Mix: Module build failed: Error: missing '{'

I encountered this issue when running production on Laravel Mix: However, this seems to be an standing issue: Module build failed: Error: missing ‘{‘ [email protected] is explicitly using the...