Testing Streamed Responses in Laravel
Over at Laravel News, Paul Redmond published a good way to test streamed responses.
Read more [laravel-news.com]
Over at Laravel News, Paul Redmond published a good way to test streamed responses.
Read more [laravel-news.com]
Short closures are coming to PHP 7.4. In this blogpost, my colleague Brent exaplins what they look like and how they can be used
Short closures, also called arrow functions, are a way of writing shorter functions in PHP. This notation is useful when passing closures to functions like array_map or array_filter.
Read more [stitcher.io]
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.
"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."
When you don't use specific knowledge or skills, you may find that, eventually, you just forget said knowledge or skill.
Something embarrassing happened to me the other day. I was playing around with a new server on Digital Ocean and it occurred to me: I had no idea how to manage it. This is slightly awkward because I've been a sysadmin for over 10yrs, the largest part of my professional career.
Read more [ma.ttias.be]
A little helper method I put on my base Model class on Secret Project VI… Kinda handy. ?♂️ pic.twitter.com/mPOMV73d5L
— Taylor Otwell ? (@taylorotwell) April 30, 2019
Read more [twitter.com]
Here's a PDF, made by Ryan Grove, that executes JavaScript when you open it in Chrome.
Read more [rawgit.com]
Brent lists the goodies coming to PHP 7.4, which will be released in december. This is going to be an epic release!
Read more [stitcher.io]
My colleague Seb gives some good reasons why he personally likes working with React over Vue.
Vue is the default JavaScript framework for Laravel apps. Being part of the Laravel community, I often get the question why I prefer React, so I've decided to write down a few standout reasons.
Read more [sebastiandedeyne.com]
?? Something you probably didn't know HTML/CSS could do. SUPER useful! pic.twitter.com/qNTDTj1Hl1
— Caleb Porzio (@calebporzio) April 29, 2019
Read more [twitter.com]
The last few months I gave a talk on how to get started with event sourcing at several conferences and user groups. I took the time to record the talk at home. It's now published on YouTube so everybody can enjoy it.
???
— Jeff Ochoa (@Jeffer_8a) April 24, 2019
A small trait to run use progression bars in @laravelphp commands#Laravel #PHP pic.twitter.com/lvGylb5QXm
Read more [twitter.com]
Recently we've released v2 of laravel-event-projector. The package is probably the easiest way to get started with event sourcing in Laravel. In v2 we've introduced two "invisible" features that improve the developer experience: auto-detection of event handling methods and auto-discovery of event handlers.
In a new post at the madewithlove blog, Geoffrey Dhuyvetters explains how you can organize your code so a bundler can make it as small as possible.
As an author of (open source) packages, I think you have the responsibility to protect the bundle size of your package consumer. When you publish a package that exports a whole range of modules (for example lodash, ramda, date-fns…) you want to make sure the package is exported in such a way that the consumer of your package (mostly bundlers) can optimize size.
Read more [madewithlove.be]
Recently we've released v2 of laravel-event-projector. The package is probably the easiest way to get started with event sourcing in Laravel.
One of the prominent new features is support for aggregates. While creating v2, I found it surprising that such a powerful concept could be implemented in so little code. In this short blog post, I'd like to explain how aggregates are coded up.
In a Laravel app policies are a great way to organize authorization logic that revolves around models.
For the longest time, I've been using Gate::before to allow superadmins to do anything they want. While working on a new app, it finally clicked how Gate::after can be useful too. I'd like to share that knowledge in this blog post.
In this blog post, I'd like to highlight two tips to make controllers in Laravel feel much lighter.
Grégoire Pineau explains how you can find the source of a segfault in PHP.
Sometimes, a segfault happens, but you don’t know where, and your PHP installation does not have tools to find it. Or sometime, you think PHP is hanging, but you don’t know where. You may use xdebug, but you don’t want to click so many times on the « next call » button.
Read more [jolicode.com]
?? Laravel Core Adventures - Did you know?
— Christoph Rumpel ? (@christophrumpel) April 17, 2019
In Laravel, we can access related data as if we would call a class property. But in fact, this is just a shortcut/hack for using the relationship method we have defined.
The second approach has one advantage, your IDE can follow it. pic.twitter.com/OjL4zNqUnp
Read more [twitter.com]
It's a bit of a click baity title, but reading it I learning that all PHPUnit's asserts have a function equivalent.
During the preparation of TDD workshops, I began to think about how to write assertions. It turns out that there are several possibilities, but is there the only correct one?
Read more [arkadiuszkondas.com]
Personally, when I want to work on something I just turn off all notification on my Mac.
Probably reached for the phone. Turned off the alarm. Glanced at the time. Scrolled through the Slack notifications. Went through the emails. You will likely continue doing it throughout the day, approximately 2,617 more times, according to some studies. We all do it, and despite all the virtues of digital minimalism, completely giving up those habits is extreme and, arguably, unnecessary. Yet we live in a culture obsessed with productivity and these harmless distractions are wreaking havoc on it.
Read more [blog.nuclino.com]