Authentication and Laravel Airlock
Mohammed Said wrote a good explanation of what Laravel Airlock brings to the table.
Read more [divinglaravel.com]
Mohammed Said wrote a good explanation of what Laravel Airlock brings to the table.
Read more [divinglaravel.com]
In this video I demonstrate how to you can create a fluent API by using pending objects. We'll take a look at how subscribers can be created in Mailcoach. As a bonus I explain how jobs are dispatched using a pending object in Laravel.
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"Freekβs newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
β pociot.dev
I'm a big fan of this approach and use Form Request like this quite often.
Let me show you what form requests can do for you - and how you can make use of them to write beautiful, expressive APIs.
Read more [pociot.dev]
β ma.ttias.be
My buddy Mattias recently improved the performance of the Oh Dear uptime checker servers by disabling the HTTP sessions.
If you run a Laravel application purely as a headless API, you can benefit from disabling the HTTP sessions. We use this setup for our Oh Dear monitoring service, where the remote servers that check for uptime are all headless Laravel setups.
Read more [ma.ttias.be]
β twitter.com
Not adding an API until absolutely necessary lets us keep our model internal and lets us iterate as needed.
— Matthieu Napoli (@matthieunapoli) October 10, 2019
Read more [twitter.com]
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]
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.
β ohdear.app
You can use the Oh Dear! API to automatically perform health checks on your app after a deploy.
You can use our API to trigger an on demand run of both the uptime check and the broken links checker. If you add this to, say, your deploy script, you can have near-instant validation that your deploy succeeded and didn't break any links & pages.
Read more [ohdear.app]
β ohdear.app
At the Oh Dear blog, my colleague Mattias explains how to use our service to verify that your site is still online after a deploy.
You can use our API to trigger an on demand run of both the uptime check and the broken links checker. If you add this to, say, your deploy script, you can have near-instant validation that your deploy succeeded and didn't break any links & pages.
Read more [ohdear.app]
A webhook is a mechanism where an application can notify an other application that something has happened. Technically, the application sends an HTTP request to that other application. In this blog post, I'd like to introduce you to two packages that we recently released. The first is laravel-webhook-server, which allows you to send webhook requests. The second one is laravel-webhook-client, which makes it easy to receive those webhook request.
β lornajane.net
Lorna Jane gives a good overview of the tools available when working on an API.
As Web Developers, we need to know how to work with HTTP from every angle. I gave a 2-hour tutorial at PHP UK that included some of my most trusted tools - but it was sold out and a bunch of people asked me if there was video (there wasn't, tutorials make little sense when videoed). Instead, I thought I'd try to set out a self-study version of the workshop (I rarely teach these days so I'm unlikely to deliver it anywhere else).
Read more [lornajane.net]
In this video tutorial Andre Madarang gives a clear intro in how to use GraphQL in a Laravel app. The packages he uses are Lighthouse and vue-appolo.
β timacdonald.me
Tim MacDonald demonstrates how you can add logic to a custom collection.
Laravel collections have become an essential part of my codebases and I couldn't imagine working without them. I have found giving collections the voice of the problem domain makes for a much nicer API when compared to the generic collection methods.
Read more [timacdonald.me]
β twitter.com
Misconceptions about HTTP caching for APIs abound. Here is a little thread that covers a bunch of them.
— Crashy McCiderface (@philsturgeon) October 10, 2018
1. "Caching API responses is WRONG, using caching for performance is a crutch and the endpoint should just be fast.
Read more [twitter.com]
Here's another awesome blogpost by my collegue Seb. In this one he explains why you should and how you can create an explicit Vue component API.
When refactoring your UI to components, always keep in mind that props and events are your components public API. Just like when you're modelling your application's domain, try to keep things explicit. Props and events should be enough to tell the outside world everything it needs to know about a component's behavior.
Read more [sebastiandedeyne.com]
β twitter.com
? Ever wanted to use the same controller to serve multiple formats?
— Adam Wathan (@adamwathan) February 15, 2018
Check out this set of macros that let you hit a single endpoint with different extensions to request the format you want:https://t.co/2sFGNf97be pic.twitter.com/HMNdicUWAy
?? Here's what it looks like in use: pic.twitter.com/zHo0GlAU6w
— Adam Wathan (@adamwathan) February 15, 2018
Read more [twitter.com]
Curl is not your only tool when creating or testing out APIs. On her blog Lorna Jane Mitchell made a nice list of alternatives.
At a conference a few days ago, I put up a slide with a few of my favourite tools on it. I got some brilliant additional recommendations in return from twitter so I thought I'd collect them all in one place in case anyone is interested - all these tools are excellent for anyone working APIs (so that's everyone!).
Paul Redmond explains how you can use Guzzle 6' middleware to add a HMAC authorization header.
I prefer to keep my dependencies as up-to-date as possible so I decided to learn Guzzle 6 and become more familiar with the middleware. The concepts are pretty straightforward and I have a few patterns that I like to use when building out middleware within my Laravel applications.
https://medium.com/@paulredmond/using-guzzle-6-middleware-in-a-laravel-application-7fbd6d966235
Last year on 28th of June Dropbox deprecated v1 of their API. On the same date this year they will turn off all v1 endpoints. If you're using Flysystem, Laravel or the official PHP SDK to work with Dropbox, it's the time to update. Last week my company released a Dropbox API client and a Flysystemβ¦
Matt Stauffer wrote down his experiences with creating a simple app on Gomix, a platform to easily create node powered sites right in your browser.
Gomix is a platform that makes it absurdly easy to spin up a new app (static HTML or Node) and see it online instantly. You can also invite your friends to collaborate, and the moment you make a change in the editor, your site updates. So, at this point I'm using Gomix and Node, and Express is an easy pick.I strongly considered using Firebase for data storage, but the Gomix team linked me to this Gomix site using Google Spreadsheets as the backing data source and I really wanted to try it out.
So we've now settled: I'll take my old HTML and JavaScript, but instead of the JavaScript loading its data from JSON files, I'll run an Express app on Gomix pulling the data from Google Spreadsheets and output its data in a JSON format. No big deal.
https://mattstauffer.co/blog/moving-tech-forward-with-gomix-express-and-google-spreadsheets