PHP code example of nihilsen / laravel-join-using
1. Go to this page and download the library: Download nihilsen/laravel-join-using library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nihilsen / laravel-join-using example snippets
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")