Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-join-using maintained by nihilsen

Description
Add support for the USING directive in join constraints for Laravel query builder
Author
Last update
2023/07/03 22:33 (dev-main)
License
Downloads
117

Comments
comments powered by Disqus

Laravel JOIN USING 🖇️

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package adds support for the USING directive in join constraints for Laravel query builder.

Installation

You can install the package via composer:

composer require nihilsen/laravel-join-using

Usage


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")

Credits

License

The MIT License (MIT). Please see License File for more information.