Open source beyond the market
– Edit
– twitter.com – Edit
?? Laravel Core Adventures - Did you know?
— Christoph Rumpel ? (@christophrumpel) May 17, 2019
Ever wondered what "hydrate" means? I've been there. Then I realized it's just a fancy word for filling an object with data.
In this Eloquent Builder example, Laravel fills a new collection object with models from an array. pic.twitter.com/D5t0EVnksM
Read more [twitter.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."
– twitter.com – Edit
I always knew the browser was pretty smart about dealing with what I thought was incomplete HTML, but I didn't know the HTML5 spec actually defined a bunch of tags as optional ?
— Adam Wathan (@adamwathan) May 18, 2019
Google actually recommends writing your HTML this way:https://t.co/t3fu98s5IM pic.twitter.com/v2RAr5Whl9
Read more [twitter.com]
– twitter.com – Edit
You know `firstOrFail`, `firstOrCreate`, etc in @laravel
— Jeff Madsen (@codebyjeff) May 19, 2019
There's also a simple `firstOr` that will run a callback if not found pic.twitter.com/q7QmPR1y1S
Read more [twitter.com]
– reinink.ca – Edit
Jonathan Reinink wrote another awesome post on how to handle a complicated query.
I was asked recently how to calculate multiple totals (aggregates) in Laravel in the most efficient way. For example, maybe you have an email subscription service and want to display various totals based on your subscribers
Read more [reinink.ca]
At the Clarabridge Developers blog, Toon Daelman wrote a good post on how to improve your exceptions.
You've made it to this post thinking "Why do we still need to talk about Exceptions?". Well, they're used everywhere in OOP codebases, but sometimes they're used in a way that make debugging a bit difficult. Let's look at some ways to make debugging exceptions a bit more fun!
Read more [engagor.github.io]
– twitter.com – Edit
? PSA: <title> tags matter (especially for people browsing the web with screen readers)
— Caleb Porzio (@calebporzio) May 28, 2019
ICYMI: https://t.co/g7IdUkEjiQ pic.twitter.com/ANIjMZUMDN
Read more [twitter.com]
– twitter.com – Edit
? Laravel quick tip
— Sebastian De Deyne (@sebdedeyne) May 21, 2019
Use ->map->only on Eloquent collections to pluck multiple attributes pic.twitter.com/z3c1sOox9J
Read more [twitter.com]
– Edit
In this video Jason McCreary creates a PR that adds a null driver to our laravel-newsletter package.
In a new blogpost, Sebastian De Deyne compares Vue syntax with React syntax.
This post is a succinct rundown of most Vue features, and how I would write them with React in 2019 with hooks.
Read more [sebastiandedeyne.com]
by Freek Van der Herten – 5 minute read – Edit
When a request comes in your app will return a response. To create that response, your application has to do some work. Most likely queries will execute. This all takes some time. Wouldn't it be nice if the same request comes in, we can return the response the application has constructed previously?
by Freek Van der Herten – 3 minute read – Edit
laravel-validation-rules is a package that contains handy custom validation rules that are being used in various client projects we made at Spatie. Last week I added a new validate rule called Delimited to the package.
In this blog post, I'd like to explain why we added it and how it can be used.
– stitcher.io – Edit
In an awesome post, my colleague Brent explains that PHP is in a very good state nowadays. If you dismissed the language previously, now is a good time to take another look.
PHP managed to evolve quite a bit since the 5.* days. Today I'm addressing the people who are either not programming in PHP anymore, or are stuck in legacy projects.
Read more [stitcher.io]
– mattallan.me – Edit
Matt Allan explains why using an offset is slow when used on large datasets.
It turns out it’s easy to page through results without using offset. All we have to do is keep track of the last ID we saw, then filter the results so we only fetch rows we haven’t seen.
Read more [mattallan.me]
– verraes.net – Edit
On his blog, Mathias Verraes started a series of posts on patterns for decoupling in distributed systems. I'll link to just one of the posts here, but they're all worth your time.
The mind switch is to think of the passage of time as just another Domain Event, exactly like all the other events. After all, if we define a Domain Event as a granular point in time where something happened that is relevant to the business, then certainly the next business day, month, or quarter, is extremely relevant.
Read more [verraes.net]
Senior CEO Frederick Vanbrabant helps you to answer this horrible interview question.
You have probably already heard the horror stories of code interviews where they ask you to reverse a binary tree on a whiteboard. (if not check this blog post that I profoundly disagree with). Well, a few days ago I was in that exact situation. And I had no idea what the interviewer was talking about. So what are these binary trees and why is it so critical that you know how to inverse them? Let’s find out.
Read more [frederickvanbrabant.com]
– protone.media – Edit
Recently Laravel introduced a Tappable trait. This blogpost explains what this trait allows you to do.
As you might know, the Laravel framework comes with a handy tap method which allows you to call the given closure with the given value and then return the value. Sounds confusing? It probably is until you've seen it!
Read more [protone.media]
– www.netlify.com – Edit
Hooks is feature was added recently to React that I really like.
In this article, we reintroduce closures by building a tiny clone of React Hooks. This will serve two purposes – to demonstrate the effective use of closures, and to show how you can build a Hooks clone in just 29 lines of readable JS. Finally, we arrive at how Custom Hooks naturally arise.
Read more [www.netlify.com]
In the latest episode of Full Stack Radio podcast, my colleague Seb explains the differences between React and Vue.
In this episode, Adam talks to Sebastian De Deyne about learning React from the perspective of a Vue developer, and how to translate all of the Vue features you're already comfortable with to React code.
Read more [www.fullstackradio.com]
– stitcher.io – Edit
My colleague Brent started a new podcasts series called "Rant with Brent". In the first episode has explains why he likes the "final" keyword in PHP.
I'm giving podcasting a try. Let me know what you think of it via Twitter or e-mail. You can download the episode here. In this episode I talk about why I think final helps you write better maintainable code.
Read more [stitcher.io]