nihilsen / laravel-join-using
Add support for the USING directive in join constraints for Laravel query builder
v0.1.0
2022-08-31 01:04 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^9.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-09 22:28:20 UTC
README
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.