Don't write your own framework
My colleague Brent shares a story to illustrate why you shouldn't write your own framework.
Read more [stitcher.io]
My colleague Brent shares a story to illustrate why you shouldn't write your own framework.
Read more [stitcher.io]
A few weeks ago, Jmac tweeted out an excellent idea. What if we could use try and catch in a collection chain?
Collections are the jam. Yet they leave me dreaming of more.
— Jason McCreary (@gonedark) June 1, 2020
Take this block that performs some custom validation logic by leveraging a value object constructor.
Collections definitely streamline it, but what if I could also chain the exception handling… 🔥 pic.twitter.com/4jj0uFgwWb
Meanwhile, Jmac and I did a few code pairing sessions to work on a possible implementation. We've added try and catch methods to the laravel-collection-macros package.
In this blog post, I'd like to share what you can do with these methods and how they work under the hood.
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."
Dries Vints was a guest on my stream. He shared his newest project, called Blade UI Kit.
It can be very hard to spot a false positive within a test. So how do you avoid them?
Read more [timacdonald.me]
We released a new package called spatie/laravel-cronless-schedule. It can run the Laravel scheduler (or any other command really), without relying on cron. Instead of cron, a never-ending ReactPHP loop is used.
In this blog post, I'd like to introduce the package to you.
After more than 2 years of building Oh Dear, I still struggle with the most fundamental question: how are users finding our application and where should we focus our marketing efforts to maximize that?
Read more [ma.ttias.be]
We're excited to announce all Oh Dear users now have access to detailed performance metrics for all of their websites!
Read more [ohdear.app]
The usage of phantom types is a simple type level trick which can help with this in practical settings, without requiring complicated features or making your code too abstract and less readable.
Read more [marcosh.github.io]
If you’ve ever found yourself asking any of these questions and happen to use VSCode, maybe the new Inline Parameters extension will help you out!
Read more [liamhammett.com]
Packages play a big role in the Laravel scene. How big and which packages? Medium user Džuris took the data from the Packagist.org API and filtered out the Laravel packages.
Read more [medium.com]
Laravel's native scheduler allows you to schedule Artisan commands to run every minute. For a project I'm working on I needed to schedule a command to run every few seconds. I found a good solution to do this using an ReactPHP powered event loop. Because this solution could be helpful for others as well, I decided to package it up.
Using the laravel-short-schedule package, you can schedule artisan commands to run every second or even lower frequencies. In this blogpost I'd like to introduce the package.
What happens to all of those local branches after the pull request has been merged and deleted on Github?
Read more [tomschlick.com]
Steve King wrote a nice introduction on how to use our event sourcing package together with Livewire. Cool stuff!
Read more [www.juststeveking.uk]
Readability of code can be vastly improved by decreasing indentation. In this video we'll reverse conditions and early returns to accomplish this. If you want to see more videos like this one, head over to the video section at Spatie.
In this video, you'll learn how to generate code coverage reports, and how to display them directly in PhpStorm.
This video is part of our Laravel Package Training video course. In that course, you'll learn how to create both framework agnostic and Laravel specific packages. We'll also source dive some popular Spatie packages together, so you can pick up some tricks we apply there.
– frederickvanbrabant.com - submitted by Frederick Vanbrabant
My buddy Frederick wrote an interesting post on why he always checks out the admin panel of an app instead of the code.
Read more [frederickvanbrabant.com]
Matt Stauffer shows a good workflow for this.
Read more [mattstauffer.com]
Together with my colleagues at Spatie, we have produced over 200 packages with more than 75 million downloads in total.
We learned a lot by quality packages like laravel-permission, laravel-backup, browsershot, laravel-medialibrary, and many more. We feel we have a pretty good workflow to produce reliable, readable, and maintainable packages.
We want to share the knowledge we have built up over the year with you in our new premium video course, titled Laravel Package Training.