Improving Artisan commands original
In this small blog post, I'd like to give you a couple of tips to make your Artisan commands better.
In this small blog post, I'd like to give you a couple of tips to make your Artisan commands better.
On the Tideways blog, Benjamin Eberlei explains PHPs garbage collection internals.
It's helpful to have a broad understanding of how garbage collection works in PHP, along with how you can interact with it so that you can create high performing applications.
Read more [tideways.com]
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 publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"
At Laracon AU, Jason McCreary gave an excellen talk on how to create maintainable Laravel apps. On his blog he published a written down version of the talk.
Being the author of BaseCode and creator of Shift gives me a unique insight into writing Laravel applications. I combined 20 years of writing code with supporting over 20,000 Laravel upgrades into 10 tips for crafting maintainable Laravel applications.
Read more [jasonmccreary.me]
For a couple of projects I needed to read and write a couple of very large Excel and CSV files. I didn't find a good package that does this so I decided to create one myself. Under the hood it uses generators, so memory usage will remain low, even when working with large files.
In this blogpost I'd like to walk you through spatie/simple-excel.
A couple of days ago my colleague Brent published a blogpost on Domain Oriented Laravel. In short, he makes the case for organising your code around business concepts or features. That might sound very "heavy" or daunting, but it's actually for easy to get started with.
In this short video I explain how you can use PhpStorm to refactor your code. Make up your own mind if you need this in your projects.
Tim MacDonald shares an interesting technique.
Action scopes are...well...just query scopes really, but instead of filtering they take an action. It's just a random name I've given them to differentiate them from regular filtering based query scopes in my projects.
Read more [timacdonald.me]
? 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.
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]
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]
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]
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]