Generics in PHP using PHPDocs
Generics are available since PHPStan 0.12. This posts explain what they’re all about.
Read more [phpstan.org]
Generics are available since PHPStan 0.12. This posts explain what they’re all about.
Read more [phpstan.org]
Laravel allows you to cast model attributes as encrypted strings1, when stored in the database. This gives you added security for any values that are sensitive (such as Personally identifiable information, PII), including complex structures such as arrays, collections, and even objects.
Read more [larasec.substack.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’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."
Good instructions provided by Nuno.
Read more [nunomaduro.com]
We've created a new package that can render a beautiful support form widget on any page. You can read more about the package in this blog post at Flare.
In this stream, I'll show you how to use the package. We'll also source dive its code.
Matthias Noback shares some considerations on when you could rely on PSR abstractions
Read more [matthiasnoback.nl]
– doeken.org - submitted by Doeke Norg
Context from traits is copy-pasted to your class and NOT inherited. What does that imply?
Read more [doeken.org]
In this stream, Brent and I showcase some cool techniques we use in our test suites.
A static analyzer helps you to find bugs in your code without even running it. Popular static analyzers for PHP are Psalm and PHPStan. In this post, we're going to look at what such a static analyzer can find in a two-year-old codebase.
Read more [flareapp.io]
Native PHP functionality and having a good design in the first place provide everything you need to avoid a mocking library.
Read more [peakd.com]
– ryangjchandler.co.uk - submitted by Ryan Chandler
Seeders are a great way of creating fixture data, as well as dummy data, for your development environment. Let me show you how we can make them even better.
Read more [ryangjchandler.co.uk]
– doeken.org - submitted by Doeke Norg
This post exmplains how you can work with iterators and generators as if they were arrays.
Read more [doeken.org]
Michael Dyrynda explains how you can use immutable dates in Laravel by default.
Read more [dyrynda.com.au]
One of the new features in PHP 8.1 is that PHP's $_FILES super global variable now contains the path to the files uploaded by the user.
Read more [php.watch]
In this stream, Pest creator Nuno Maduro explains how his testing tool works under the hood.
If you want to know how to use Pest (or PHPUnit) to test your application code, consider picking up our Testing Laravel video course.
Whenever something happens in one of your repos on GitHub, you can configure a webhook to be sent to your app. This way, you can perform some extra logic when a particular event occurs on the repo. A silly example would be to send someone a mail when an issue is opened.
We've created a new package called spatie/laravel-github-webhooks that makes it easy to consume GitHub webhooks in a Laravel app. In this blog post, I'd like to tell you all about it.
Knowing how to write automated tests is a fundamental skill for any developer. By adding a quality test suite to your application, you'll end up with fewer bugs in production. It allows you to refactor with confidence using a test suite that has your back.
We're currently recording a new premium video course called Testing Laravel. It will be released in September.
The release of PHP 8.1 will be here within a few months, and once again there are many features to get excited about.
Read more [stitcher.io]
Here's a neat use of our Blink package.
Read more [sebastiandedeyne.com]
JetBrains ran their yearly survey on all the things that devs like and use. Here are the results for the PHP ecosystems
Read more [www.jetbrains.com]
Here's a cool technique by Bram Van Damme
Read more [www.bram.us]