Namespaced functions in PHP
? When calling a function, #PHP will first look for one in the current namespace before calling the global one. pic.twitter.com/qYh6o9eypZ
— Freek Van der Herten (@freekmurze) October 17, 2019
Read more [twitter.com]
? When calling a function, #PHP will first look for one in the current namespace before calling the global one. pic.twitter.com/qYh6o9eypZ
— Freek Van der Herten (@freekmurze) October 17, 2019
Read more [twitter.com]
When using PHP, you've probably used DocBlocks. They can be used to add additional information that can't be inferred by looking at the source code alone. DocBlocks can be used by IDEs, like PhpStorm, to improve autocomplete suggestions.
In this blogpost, I'd like to highlight a not so well known DocBlock: mixin.
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.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
Don't try to manage your colleagues too much.
Employees want to be managed by people who empower them, not manage every bit of their day. The better you get at hitting the right balance between oversight and autonomy, the more likely you are to win long-term fans who will advocate for you as your career progresses.
Read more [forge.medium.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]
When the void typehint was introduced in PHP 7.1. There was some debate about it. Some people wondered if it is beneficial to type nothing? I was one of them. Meanwhile, I changed my opinion on it. In this short post, I'd like to give you a small example where I think void shines.
A little piece of code I write often enough to mention. Pretty elegant IMO ? pic.twitter.com/F56izKw3hW
— Caleb Porzio (@calebporzio) October 9, 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]
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]
Recently we released a new small package called laravel-rate-limited-job-middleware. As the name implies, this package can be used to limit how many times a job may be executed in a given amount of time.
In this short blog post, I'd like to introduce the package to you.
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]
Marcel Pociot, our teams and me have worked hard to create Ignition, the brand new error page in Laravel 6.
Earlier this week I had the pleasure of being invited to the stream of Gary Hockin where we talked about the internals of Ignation.
Regarding https://t.co/Ky9pICMocc, here's an example (not saying it makes sense to write this test, just showing how it works). pic.twitter.com/1MOFXk1H79
— Matthias Noback (@matthiasnoback) 2 oktober 2019
Read more [twitter.com]
Seb De Deyne explains the differences and similarities between Intertia and Livewire.
I’ve seen many people compare the two, or ask if they can be used together. This post showcases their similarities and differences, and should help you understand which problems they each solve best.
Read more [sebastiandedeyne.com]
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.
If you're using Ignition (and you probably are if you're on Laravel 6), you know have access to a new helper function that help you debug code.
We now give you ddd - a globally available helper function that does everything that you love about dd and sprinkles everything that Ignition has to offer on top of it.
Read more [flareapp.io]
sql tips: you can group by anything pic.twitter.com/YoJVlUyghG
— ?Julia Evans? (@b0rk) 29 september 2019
Read more [twitter.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]
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]