Laravel 5.7 にて connection を指定したクエリビルダのやり方 # Laravelconnection ## connection $builder = \DB::table('table'); // Illuminate\Database\Query\Builder $builder->distinct(); postgres $builder = \DB::connection('postgresql'); // Illuminate\Database\PostgresConnection $builder->table('table'); $builder->distinct(); // Error `->distinct()` Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined method Illuminate\Database\PostgresConnection::distinct()
\DB::connection('postgresql')->select('select * from table');
xcX3v84RxoQ-4GxG32940ukFUIEgYdPy
4a0c1d145f84c9ea3dad6733dc69740e
Stop