Making sense of API response times

Link – www.codemonkey.io

Mathias Hansen shares how API response time data is used at Geocodio and how to work with this kind of data in MySQL.

The API is the backbone of our business, so over the years we have continously worked to improve and ensure consistent performance. We look at many parameters such as uptime and error rates, but one of the key metrics is API response time. This is how we use this data.

Read more [www.codemonkey.io]

Client Side PHP

Link – atymic.dev

Atymic (real name unknown to me), a developer hailing from Sydnex, wrote a blogpost on how he managed to get PHP running in the browser via WebAssembly.

I'm sure you've come across plenty of sites that use javascript on the front end, but what about using PHP as a client side language? How, you ask? Since PHP is C based, it's actually possible to compile a version that's able to run inside your web browser using web assembly.

Read more [atymic.dev]

Stay up to date with all things Laravel, PHP, and JavaScript.

Follow me on Twitter. I regularly tweet out programming tips, and what I myself have learned in ongoing projects.

Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

Testing your Laravel app using GitHub actions

Link – ma.ttias.be

Mattias Geniar explains how you can use GitHub actions to run the testsuite of your Laravel app.

Last year we wrote a blogpost about our setup we use for Oh Dear! with Gitlab, and how we use their pipelines for running our CI tests. Since then, we've moved back to Github since they introduced their free private repositories. In this post I'll describe how we re-configured our CI environment using Github Actions.

Read more [ma.ttias.be]

A package that adds resource links to your Laravel API resources

Original – by Freek Van der Herten – 3 minute read

At Spatie we have several projects where the UI is rendered using JavaScript (we're big fans of Inertia). The backend and routes are defined in the Laravel app. The backend sends information to the frontend using API resources.

We often add the available routes the frontend can use as links property on the resource. To avoid having to add all routes manually, my colleague Ruben released a package, called laravel-resource-links that can automatically add resource links to the API resource.

In this post, I'd like to introduce the package to you.

Read more

Live-Updating Status Page With Livewire

Link – calebporzio.com

Recently status pages were added to Oh Dear!. My colleague Sebastian took care of the live updates with a few lines of JavasScript.

In a new video on his blog Livewire creator Caleb Porzio, shows how can create the same behaviour with Livewire (and without having to write JavaScript). Impressive stuff!

This sort of thing is right up my alley, but I couldn't help but think how easy it would be in Livewire. Here's is the same functionality implemented with Livewire, in three or four little code additions. No JS!

Read more [calebporzio.com]

Track successful email deliveries, clicks and opens in your Laravel PHP application with Mailgun

Link – ninjaparade.ca

Yaz Jallad explains how you use Mailgun's webhooks to determine click and open rates of mails.

While building ContestKit there was a feature I wanted to allow users to know if the emails that were sent to the winners were delivered successfully. Thankfully this feature is relatively easy to add because of Mailgun's amazing API. Let's create a new Laravel application and get started.

Read more [ninjaparade.ca]

Software Architecture is Overrated, Clear and Simple Design is Underrated

Link – blog.pragmaticengineer.com

Gergely Orosz argues that you should start with a simple design and try your best to keep it simple. I don't necessarily agree with everything in the post, but it's an interesting opinion nonetheless.

Software architecture best practices, enterprise architecture patterns, and formalized ways to describe systems are all tools that are useful to know of and might come in handy one day.

Read more [blog.pragmaticengineer.com]

Lazy leadership

Link – www.mikeveerman.be

Mike Veerman points out that managers that are not making decisions are lazy.

Lazy management means not choosing. It’s only paying lip service. When we put quality first, together with security and performance and everything else, we’re not doing our job. We’re postponing the inevitable in the hope the monster goes away.

Read more [www.mikeveerman.be]

Live updating Oh Dear! status pages

Link – sebastiandedeyne.com

Sebastian De Deyne explains how the live updating on Oh Dear status pages works.

We were originally going to use Vue for the pages, so we could make the entire view reactive so we could easily fetch and update data with AJAX or websockets. I started building the status page view, but quickly became hesitant about the decision to use Vue. It didn’t feel like the right tool for the job.

Read more [sebastiandedeyne.com]