reedware/laravel-relation-joins
Adds the ability to join on a relationship by name.
v9.0.1
1.4M downloads/mo
#3151 most downloaded on Packagist
tylernathanreed/laravel-relation-joins
What this package is like to depend on
Last release 4 months ago
18 Apr 2026
Release timing varies
gaps range from 9 days to 1.1 years
Some releases are documented
notes for 10 of 33 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
33 releases · first in 2019
3 releases in the last 12 months
see the full history below
Release timeline
32 releases · Aug 2019 to Apr 2026Releases
latest 33-
v9.0.118 Apr 2026Release notes
Open source →Fixes #46
Assertion errors are no longer being thrown to
method_existsusage attempting to detect macros. -
v9.0.019 Mar 2026Release notes
Open source →Laravel 11 reached its end of life support on March 12th, 2026. I have dropped support for Laravel 11 (you can continue using it if you're on the 8.x release), and I've formally added support for Laravel 13.
-
v8.1.019 Mar 2026Release notes
Open source →Fixes #42
An exception is now thrown when a relation in array-syntax goes unused.
-
v8.0.024 Feb 2025Release notes
Open source →Laravel 10 reached its end of life support on February 4th, 2025. I have dropped support for Laravel 10 (you can continue using it if you're on the 7.x release), and I've formally added support for Laravel 12.
-
v7.0.013 Dec 2024Release notes
Open source →Out with PHP 8.1, in with PHP 8.4
PHP 8.1 reached its end of active support life over a year ago (security support will continue until EOY 2025). I have dropped support for PHP 8.1 (you can continue using it if you're on the 6.x release), and I've formally added support for PHP 8.4.
Relation Generics
There was also a change within Laravel 11 (#51851) which added generics to relations. I've updated the static analysis within this package to support those generics as well. There may be additional changes in the future as people start trying out query scopes within joins, as PHPStan/Larastan should now be able to detect that the join clause is for a specific model.
Breaking Change
The dynamic addition of properties has been deprecated in PHP 8.4, so the ability to modify join types via
$join->type = 'left'has been removed, as it relied on this feature. You'll have to piece together your joins in another manner now.Before:
User::query()->joinRelation('posts.comments', [ 'comments' => function ($join) { $join->type = 'left'; } });
After:
User::query() ->joinRelation('posts') ->leftJoinThroughRelation('posts.comments');
-
v6.0.120 Mar 2024Release notes
Open source →This is more of a technical release.
The PHPStan level has been increased from 6 to 8, and the GitHub actions have been bumped from Node 16 to Node 20.
These changes help maintain the quality of each release.
-
v6.0.020 Mar 2024Release notes
Open source →Laravel 9 reached its end of life earlier this year. I have dropped support for L9, and added official support for Laravel 11.
With this comes dropping PHP 8.0, with the new minimum of PHP 8.1.
-
v5.0.025 Sep 2023Release notes
Open source →Laravel 8 reached its end of life earlier this year. I have dropped support for L8, and added future compatibility for the upcoming Laravel 11.
With this comes dropping PHP 7.3, with the new minimum of PHP 8.0.
PHP 8 offers better type-hinting, and overall works better with static analysis tooling. I have incorporated PHP Stan into the pipeline builds moving forward to offer better quality code for everyone.
-
v4.0.225 Sep 2023 -
v4.0.101 Apr 2023 -
v4.0.001 Apr 2023Nothing published for this version
-
v3.0.009 Feb 2022Nothing published for this version
-
v2.4.225 Jul 2021Nothing published for this version
-
v2.4.125 Jul 2021Nothing published for this version
-
v2.4.025 Jul 2021Nothing published for this version
-
v2.3.012 Jul 2021Nothing published for this version
-
v2.2.209 Jul 2021Nothing published for this version
-
v2.2.107 Jul 2021Nothing published for this version
-
v2.2.007 Jul 2021Nothing published for this version
-
v2.1.003 Jul 2021Nothing published for this version
-
v2.0.122 Jun 2021Nothing published for this version
-
v2.0.008 Jun 2021Nothing published for this version
-
v1.0.1008 Jun 2021Nothing published for this version
-
v1.0.912 Sep 2020Nothing published for this version
-
v1.0.813 Aug 2020Nothing published for this version
-
v1.0.7no dateNothing published for this version
-
v1.0.611 Aug 2020Nothing published for this version
-
v1.0.513 Mar 2020Nothing published for this version
-
v1.0.401 Nov 2019Nothing published for this version
-
v1.0.328 Sep 2019Nothing published for this version
-
v1.0.228 Sep 2019Nothing published for this version
-
v1.0.110 Aug 2019Nothing published for this version
-
v1.0.010 Aug 2019Nothing published for this version