Resisting complexity
Last week Adam Wathan's excellent Laracon US talk was published. Highly recommened to check it out even if you don't use Laravel.
Last week Adam Wathan's excellent Laracon US talk was published. Highly recommened to check it out even if you don't use Laravel.
At the LaraconLive India conference, Shawn McCool shared some interesting ideas on how to handle models in complex apps.
If you want to speak at the 2019 edition of the conference, you'll be happy to learn that they currently have a CFP running.
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.
"I’ve been reading freeks newsletter for a while now, and it’s easily one of my favorite developer newsletters. Freek shares practical, no-nonsense insights from running Spatie, maintaining hundreds of open-source packages, and shipping real products. Every time I get useful Laravel tips, smart tooling advice, always high quality and immediately applicable."
Besides enjoying some greenfield work, we often have to work on legacy projects at Spatie too. Sometimes those projects don't run on the latest PHP version. I this blogpost I'd like to show you a way to switch PHP version easily when using Laravel Valet. (I know you could also use Docker or…
For a project I'm working on I needed to build a lightweight, pragmatic search. In this blogpost I'd like to go over my solution. Searching Eloquent models Imagine you need to provide a search for users. Using Eloquent you can perform a search like this: User::query() ->where('name',…
After tweeting out a screenshot, it often get questions around which editor, font or color scheme I'm using. Instead of replying to those questions individually I've decided to just write down the settings and apps that I'm using. IDE I mainly program PHP. Mostly I develop in PhpStorm. Here's a…
#laravel package creators: did you know you can just register your own factories?https://t.co/EHwIoE1VTm pic.twitter.com/zevHhaVh2c
— Freek Van der Herten (@freekmurze) 11 oktober 2018
Tip nr.2 for package creators: you can just use Schema to create tables for your tests.https://t.co/2VO0o2jfiG pic.twitter.com/nXUf7mjxRU
— Freek Van der Herten (@freekmurze) 11 oktober 2018
And another tip: need to use a sqlite in memory db in your orchestra tests? Just set the db connection tot testing in your phpunit config.https://t.co/POtg2N2M4e pic.twitter.com/yE2jtD7CoP
— Freek Van der Herten (@freekmurze) 11 oktober 2018
Read more [twitter.com]
My colleague Brent shares how we've been structuring our non-trivial projects at Spatie.
In this post we'll look at a different approach of structuring large code bases into separate domains. The name "domain" is derived from the popular paradigm DDD, or also: domain driven design.
Read more [stitcher.io]
In this video VueJS core member Chris Fritz gives some good Vue tips.
Every friend I have with a job that involves picking up something heavier than a laptop more than twice a week eventually finds a way to slip something like this into conversation: “Bro,1 you don’t work hard. I just worked a 4700-hour week digging a tunnel under Mordor with a screwdriver.” They have a point. Mordor sucks, and it’s certainly more physically taxing to dig a tunnel than poke at a keyboard unless you’re an ant. But, for the sake of the argument, can we agree that stress and insanity are bad things? Awesome. Welcome to programming.
Read more [www.stilldrinking.org]
Misconceptions about HTTP caching for APIs abound. Here is a little thread that covers a bunch of them.
— Crashy McCiderface (@philsturgeon) October 10, 2018
1. "Caching API responses is WRONG, using caching for performance is a crutch and the endpoint should just be fast.
Read more [twitter.com]
In a new post on his blog Senior CEO Frederick Vanbrabant explains the Integration Operation Segregation Principle, which is programmerspeak for splitting your code into nice little testable bits.
As you can see the Integration Operation Segregation Principle is just a long and complicated term to describe something very simple. This all might seem like a lot of work, but it’s worth it. Your code and especially your tests will thank you later
Read more [frederickvanbrabant.com]
Marcel Pociot recently created a Nova tool for Honeybadger. On their blog Marcel gives some interesting details on how it was created.
In the last weeks, I've been working with the team from Honeybadger on a custom resource tool to add Honeybadger error tracking output to Laravel Nova. It's a great addition to Nova and allows the developer to easily get access to error tracking information that, for example, is associated with specific users.
Read more [blog.honeybadger.io]
It's perfectly fine if your controller doesn't extend anything#php #laravel pic.twitter.com/GVLYNDhvWE
— Freek Van der Herten (@freekmurze) 27 september 2018
Read more [twitter.com]
Patrick Brouwers is doing an awesome job creating a quality Laravel package to integrate with Excel. The newest version can import Excel files.
Laravel Excel 3.0 was released a while ago and completely redesigned the architecture behind exports. Our next target was to do the same paradigm shift for imports. Development took some time, because we wanted to get it right from the start.
Read more [medium.com]
In a new post on her blog Jessica Mauerhan has some good examples on the various types of test doubles.
Did you know that a Mock is only one type of a test double? Most of us use the word “mock” to mean any kind of test double, but there’s actually five different types. It really can help you understand what you’re trying to accomplish with your test if you know a little bit more what you’re doing with your test doubles, so this article will explain the kinds of test doubles, when you use them, how you use them and why.
Read more [jmauerhan.wordpress.com]
Today we launched our newest package called BladeX. In short this package provides you with an easy html like way to render custom html components in your Blade views. In this blogpost I'd like to introduce the package to you. A first example When building a server rendered app you're probably going…
Earlier today we released BladeX, a package that allows you to use Blade components using a Vue inspired syntax. Read all about it in my previous blogpost. In the latest North Meets South podcast Jacob and Michael discussed BladeX and wondered if the package could be married with view models or…
In a new blogpost, Evan You, the creator of Vue, outlines the changes and new features coming to the next major release of Vue.
There are greatly improved tools that could enhance our workflow, and many new language features that could unlock simpler, more complete, and more efficient solutions to the problems Vue is trying to solve. What’s more exciting is that we are seeing ES2015 support becoming a baseline for all major evergreen browsers. Vue 3.0 aims to leverage these new language features to make Vue core smaller, faster, and more powerful.
Read more [medium.com]
Developers can now instruct browsers to control whether cookies are sent along with the request initiated by third party websites - by using the SameSite cookie attribute, which is a more practical solution than denying the sending of cookies.
Read more [www.netsparker.com]
? #LaravelTip You can override the validationData method on your custom FormRequest class if you need to modify the request data _before_ it's validated against. #laravel pic.twitter.com/GoVw93sSrD
— Glenn Kimble Jr (@GlennKimbleJr) September 8, 2018
Read more [twitter.com]