app/Services/IndividualListService.php
private function whereFamily(bool $fams, Builder $query): void
    {
        if ($fams) {
            $query->join('link', static function (JoinClause $join): void {
                $join
                    ->on('l_from', '=', 'n_id')
                    ->on('l_file', '=', 'n_file')
                    ->where('l_type', '=', 'FAMS');
            });
        }
    }
private function whereFamily(bool $fams, Builder $query): void
    {
        if ($fams) {
            $query->join('link', static function (JoinClause $join): void {
                $join
                    ->on('l_from', '=', 'n_id')
                    ->on('l_file', '=', 'n_file')
                    ->where('l_type', '=', 'FAMS');
            });
        }
    }
private function whereFamily ( bool $ fams , Builder $ query ) : void { if ( $ fams ) { $ query -> join ( 'link' , static function ( JoinClause $ join ) : void { $ join -> on ( 'l_from' , '=' , 'n_id' ) -> on ( 'l_file' , '=' , 'n_file' ) -> where ( 'l_type' , '=' , 'FAMS' ) ; } ) ; } }
Restrict a query to individuals that are a spouse in a family record.

@param bool    $fams
@param Builder $query
Restrict a query to individuals that are a spouse in a family record .