Using Laravel's Policies and Route Model Binding without Eloquent
Another nice post by Tim who continues to share suprising, little nice features of Laravel.
Read more [timacdonald.me]
Another nice post by Tim who continues to share suprising, little nice features of Laravel.
Read more [timacdonald.me]
Seb makes the case that subtracting things can be better than adding things.
Read more [sebastiandedeyne.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.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
Pascal Baljet shares a nice way to handle Base64 encoded files in Laravel
Read more [protone.media]
– atymic.dev - submitted by atymic
Overview of the new upsert feature in Laravel 8.10, how to use it and some tips.
Read more [atymic.dev]
Larry Garlfriend explains how you can use PHP 8's weak maps to implement a self cleaning cache. Pretty sweet!
Read more [platform.sh]
A nice, concise post by Sindre Sorhus on when to issue bump and when not to.
Read more [blog.sindresorhus.com]
In this blogpost, Tim MacDonald warns that PHP doesn't give you any warning when using ::class on a class that does not exist.
Read more [timacdonald.me]
We've already covered a lot of ground in this series. Let's finish by highlighting some miscellaneous interesting tidbits.
Our company has created a lot of open-source packages. At the moment of writing, we have over 200 packages, which have been downloaded nearly 100 million times. Because we think the package users might be interested in our paid offerings as well, we've put a small ad in the readme of each repo. In this blogpost I'll explain how we manage these ads using Laravel Nova and S3.
We'd like to stay in touch with the people interested in our products by sending them emails when we got some news on an upcoming product, or when we are running a promo for existing products. To handle subscriptions and send out emails, we use our home-grown Laravel package Mailcoach. Let's take a look at how we use Mailcoach ourselves.
On our site you'll find the documentation of our bigger bigger packages, like laravel-medialibrary, laravel-backup, laravel-event-sourcing, ... Let's take a look at how that works.
On our website, we have a video section. All our videos uploaded to and handled via Vimeo where we have a Pro subscription. We chose Vimeo because it has an excellent widget to display videos, it converts our videos very fast, and it has a nice API to work with. Let's take a look at how Vimeo is integrated in our site.
On our Laravel powered company website we sell digital products: video courses, e-books, and software packages. Behind the scenes we use Laravel, Paddle, Vimeo, the GitHub API and a couple of other things.
We've open-sourced our site. You'll find the actual code we have deployed in the spatie-be repo on GitHub. In this blog post, I'll guide you through the code.
– blog.logrocket.com - submitted by Leonardo Losoviz
This is an intro to how transpiling works for PHP: Similar to how Babel compiles JS to make it compatible with older browsers, Rector can convert PHP code across versions. So we can use PHP 7.4 features (typed properties, arrow functions), and deploy it to PHP 7.1.
Read more [blog.logrocket.com]
Some of our products, like Mailcoach and Media Library Pro, are PHP packages for which people can buy a time-limited license. Of course, we want customers to be able to install our paid packages using Composer. Our paid packages are not registered on Packagist, because Packagist is meant to be used for free packages, and there's no way to handle licenses. Let's take a look at how we can solve this using Satis.
– timacdonald.me - submitted by Tim Mac
Here's how to handle moving from a classic foreign key constrained relationship, to a polymorphic relationship in Eloquent, without impacting the end user.
Read more [timacdonald.me]
Paratest is an extension on top of PhpUnit that adds support for parallel testing. For our unit tests, we could just add Paratest and it works without any configuration!
Read more [blog.mollie.com]