Latest Laravel/PHP Articles

Latest Laravel/PHP Articles curated daily from around the web.


Finding a community of like-minded people to interact with is important for everyone.

tim.macdonald.au

Single-use Tests
The tests I write are usually written in Pest, PHPUnit, or Jest. I also usually commit them to a code repository - but not all automated tests should be committ...
You probably think fast database queries are good. You also probably think slow database queries are bad.
CodeMentor Codementor is an online marketplace connecting developers with experts for on- demand 1:1 help via screen sharing, video, and text chat.
When focusing in on some specific functionality of an application, such as notifications or queuing, I often head over to the docs and catch up on the current s...
Laravel recently introduced the ability to detect n+1 issues caused by lazily loading Eloquent relationships.
When you are working with a one-to-many relationship, it is sometimes the case that a particular instance on the "many" side of the relationship is flagged as u...
At work I decided to show git rebase the love it deserves with a brown bag session and had a lot of fun doing it so thought I'd record it and share it publicly....
CodeMentor Codementor is an online marketplace connecting developers with experts for on- demand 1:1 help via screen sharing, video, and text chat.
This talk was given at the 2020 LaraconUS / Online conference. You can find all the talks from previous years in the Laracon Online showcase. When you take the...
I made an assumption. I, for no reason at all, always assumed Laravel's Policy authorization and Route Model Binding functionality were only meant to be used wi...
Read the full article on Laravel News.
In this video we look at how you can avoid false positives in your tests by making use of magic values. I'll show you some tests that seem to be passing, but in...
CodeMentor Codementor is an online marketplace connecting developers with experts for on- demand 1:1 help via screen sharing, video, and text chat.
When migrating a classic foreign key constrained relationship, such as belongsTo, over to a polymorphic relationship, you've got to be very sure you've covered...
I have been using a helper trait to make working with middleware arguments feel nicer. I'm going to walk through the current way we can pass arguments to middle...
This blog post is an in-depth walk though of a tweet I sent out a few weeks ago. You can probably get everything you need from the tweet and the comments on it,...
I just read Freek's blog post on the void return type (which you should check out), and it reminded me of this pattern I dig and thought I'd write up a quick po...