Add support for the USING directive in join constraints for Laravel query builder
nihilsen/laravel-join-using is a Laravel package for add support for the using directive in join constraints for laravel query builder.
It currently has 4 GitHub stars and 109 downloads on Packagist (latest version v0.1.0).
Install it with composer require nihilsen/laravel-join-using.
Discover more Laravel packages by nihilsen
or browse all Laravel packages to compare alternatives.
Last updated
JOIN USING 🖇️This package adds support for the USING directive in join constraints for Laravel query builder.
You can install the package via composer:
composer require nihilsen/laravel-join-using
use Illuminate\Support\Facades\DB;
use Nihilsen\LaravelJoinUsing\JoinUsingClause;
$query = DB::table('left_table')->rightJoin(
'right_table',
fn (JoinUsingClause $join) => $join->using('shared_column')
);
echo $query->toSql() // select * from "left_table" right join "right_table" using ("shared_column")
The MIT License (MIT). Please see License File for more information.