Laravels Command Bus
– www.juststeveking.uk - submitted by Steve McDougall
In Laravel 5.1 the Command Bus was replaced with Dispatchable Jobs, we can still use them but let us also look at how to add a Command Bus.
Read more [www.juststeveking.uk]
– www.juststeveking.uk - submitted by Steve McDougall
In Laravel 5.1 the Command Bus was replaced with Dispatchable Jobs, we can still use them but let us also look at how to add a Command Bus.
Read more [www.juststeveking.uk]
– www.juststeveking.uk - submitted by Steve McDougall
Of all of the design patterns you could use in your code, the adapter pattern is one of my all time favourites. It allows you to abstract the implementation to an adapter that implements an interface. so you can switch implementation simply by switching the adapter.
Read more [www.juststeveking.uk]
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 publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"
– www.juststeveking.uk - submitted by Steve McDougall
I get asked about API response testing a lot, how should you do it, and where to start. I have a general rule when it comes to testing APIs, and that rule is: "test your code, and your code only". What do I mean by this? Let me explain:
Read more [www.juststeveking.uk]
– www.juststeveking.uk - submitted by Steve McDougall
In a typical Laravel application we are very used to doing things in a certain way, by the book as they say. However there comes a point in the applications lifetime that it is going to be easier to start looking to split this code into Domains so that we can logically group our code.
Read more [www.juststeveking.uk]
Larry Garfield shares a neat use of match
Read more [peakd.com]
Here's a small interview with the new developers that will receive funding via The PHP Foundation
Read more [thephp.foundation]
– doeken.org - submitted by Doeke Norg
The Middleware Pattern allows you to easily change the input and output of an action; one layer at a time.
Read more [doeken.org]
PHP is a wonderful dynamic language that's capable of many cool things. I recently stumbled upon something quite fantastic that I want to share with you.
A couple of months I go I had the honour giving a talk at the GPUG usergroup on how to convert a PHPUnit testsuite to Pest.
Nowadays, I use Pest as the default testrunner for every package / project that I start.
I'm proud to announce that our new premium course on writing readable PHP is now available. It's called Writing Readable PHP.
This course contains a collection of bite-size tips (both in written form and videos) that make your code a joy to read for your co-workers and future self. These tips are aimed towards developers who know the basics of PHP and want to improve their craft. As a bonus, you'll learn to use static analysis to ensure that your code is understandable and correct.
Writing Readable PHP has been created by our team and Christoph Rumpel. It contains our combined knowledge on how to write the best PHP possible.
Last month, The Laravel Documentary was released which showed the history behind Laravel. For the documentary a lot of people that are active in the Laravel community were interviewed.
From the footage that did not make into the documentary, the makers behind the documentary distilled a cool new short movie about PHP.
I'm honoured the some of my interview snippets made the cut. 😎
A super nice way to go about this, thanks to Philo. Cool stuff!
Read more [philo.dev]
Passing booleans to a method can be code smell, as it is not clear what a boolean does by reading the calling code.
Unlike traditional Long-polling using AJAX requests, where multiple requests are sent to the server and a new connection is established each time, event streams are sent to the client in real-time in a single request.
Read more [devdojo.com]
PHP is such a good language at this point.
Read more [dnlytras.com]
Andraes Möller blogged a few interesting strategies to name the constructors of your PHP objects.
Read more [localheinz.com]
While Amazon S3 is awesome for storage, It also has a feature called S3 Select. With S3 Select, You can use a simple SQL query to filter the content of the stored objects. and retrieve only a subset of data that you need.
Read more [sanjit.me]
I'm looking forward seeing with this group of developers will do for PHP.
Read more [opencollective.com]
The Laravel team released the next major version of Laravel Valet (3.0), which introduces running multiple versions of PHP in Valet applications side-by-side.
Read more [laravel-news.com]
I'm happy to announce that we have released Visit. This tool can display the response of any URL. Think of it as curl for humans. By default, the output will be colourized, and the response code and time will be displayed after the response.

JSON responses will be colourized by default as well.

And there's integration with Laravel: it can log in any user, report the numbers of queries used to build up the response, and more.

I'd like to tell you all about it in this blog post.