Hi there!

Welcome to the 146th freek.dev newsletter!

Here are a couple of links of which I hope you'll enjoy that as much as I did.

A package to automatically discover routes in a Laravel app
I'm proud to announce that our team has released a new package called spatie/laravel-route-discovery. This package can be used to automatically discover and register routes by looking at your controllers and views. Of course, you can also still register routes like you're used to in a routes file.…

What's new in Laravel 9
In this video, Jeffrey Way of Laracasts shares all the cool new stuff in Laravel 9.

Lean Admin - Laravel package for building custom admin panels (sponsored link)
Lean Admin is a TALLstack-based package for building admin panels using extremely expressive
code - yet still fully customizable and extensible. Join the waiting list to get a discount when
it launches in a few weeks.

Speeding up array_merge()
Here's why you should be careful with array_merge in loops.

React Hooks for Beginners: Managing State
What's all the fuss about React hooks? In our latest blog post, we share the basics of managing state with hooks in a React app.

The Laracon Summer 2021 videos have been released.
Last year, Laracon held another online edition in the summer. All of the videos are now publicly viewable. You'll find them in this playlist on YouTube. I had the honour of doing a short talk on snapshot testing in PHP, which you can watch here.

How does Treblle scale on AWS without breaking the bank?
Here's how Treblle, a large Laravel app, manages to keep their AWS costs low.

10 lessons in productivity and brainstorming from The Beatles
As a big Beatles fan, I enjoyed this blog post very much. I often think there are a lot of similarities between programming and making music.

Laravel Worldwide meetup: Building CLI apps with Termwind & What's new in Inertia
On this edition of the meetup, Francisco Madeira talks about creating beautiful CLI apps with Termwind. Claudio Dekker shows what's new in Inertia.

DevToys for Mac
Here's a free nifty little Mac app that can do a whole bunch of tasks: formatting JSON, encode URLs, generate UUIDS.

Automate keeping your environment files in sync.
How many times have you onboarded a new dev onto your team, only to have to spend ages debugging with them because your project's .env.example file is wildly outdated? Here's a package that can help with that!

Modelling Tetris in PHP
In a few lenghty sessions on YouTube, you can watch Shawn McCool build Tetris using PHP

Geeking Out Over PHP
I was recently interviewed on my journey in PHP by the good folks at Kong. During this session you'll also see me demoing Ray.


Community links

In this section you'll find links submitted by others.
Let me know if you did write or stumbled across a blog post, tutorial or video that might be interesting to appear in this section


Enforce Morph Map On Polymorphic Relationship - Laravel Tip (submitted by Ashish Dhamala)

Working with collections of models in Laravel Livewire (submitted by Jonne Roelofs)

💡 Hot Reload with Laravel Sail (submitted by Chrysanthos)

How To Fix Laravel & PHP Code Styles Locally (submitted by STEPHEN JUDE)

How To Use Laravel With Oracle Database (submitted by Filip Josifovski)

Autoloading Global Helpers The Laravel Way (submitted by STEPHEN JUDE)

Wrapping Flatpickr Part 2: Passing Configuration (with Laravel Livewire and Alpine.js) (submitted by Jonne Roelofs)

Context Switching & Multitasking: A Software Developer's Perspective (submitted by STEPHEN JUDE)

PHP testing snippet: improve readability when testing private methods. (submitted by Juan Pablo)

Updating multiple database records (with independent data) in a single query (submitted by Jorge González)

Blade, Requests, Routing, and Validation: New features since the Laravel 8.0 release in September 2020 (2/2) (submitted by Pascal Baljet)

Streamlining Your Controllers With Eloquent Scopes (submitted by STEPHEN JUDE)

Laravel Blanket - Dashboard To View Your HTTP Client Requests In Laravel (submitted by Ashish Dhamala)


Old posts

Here are a couple of links from a while ago!

Creating a Ruby Gem for Ray

Never Good Enough

PHP-Doc in Blade-Views

Cold Starts in AWS Lambda

When to add types and when to infer in TypeScript

Route based modals with Laravel, Inertia.js and Vue.js

How to post to Twitter from your Laravel app using Zapier

How to Use Cookies With AlpineJS

Multi-server Atomic Laravel Deployments with GitHub Actions

Live coding new Ray features

Determining the start of the next business day in Oh Dear

Setup MailHog with Laravel Valet

Generate HTTPS URLs when running Laravel behind a proxy

Dealing with failed jobs

Using composer patches

Full-Text Search with MeiliSearch and Laravel Scout

Making our Laravel test suite in Oh Dear ready for parallel testing

What's new in PHP 8.1

A mail driver to quickly preview mail in Laravel apps



Did you like this newsletter?

I take a lot of time curating the right links for you. You could do me a favor by either spreading the word and letting others know about my newsletter.

Alternatively you could consider picking up one of the paid products my team and I have worked on:

All spatie products
Oh Dear
Flare

For each of the above you can use this coupon code to get a discount:
DISCOUNT-FOR-FREEK-DEV-READERS

If you have any questions, remarks or thoughts about this newsletter, simply hit reply!
Thank you so much for reading!




Freek

You are receiving this newsletter because you subscribed at https://freek.dev
Unsubcribe from this newsletter
This mail was sent using Mailcoach