classes/Models/RedirectRule.php
public function scopeMatchUsingRequest($query)
    {
        return $query->where(function ($query) {
            $from = $this->pathAndQuery();
            $escaped_from = DB::connection()->getPdo()->quote($from);
            $from_col = DB::getDriverName() == 'sqlsrv' ? '[from]' : '`from`';
            $query->where('from', $from)->orWhereRaw("{$escaped_from} LIKE {$from_col}");
            if (Config::get('decoy::core.allow_regex_in_redirects')) {
                $query->orWhereRaw("{$escaped_from} REGEXP {$from_col}");
            }
        });
    }
public function scopeMatchUsingRequest($query)
    {
        return $query->where(function ($query) {
            $from = $this->pathAndQuery();
            $escaped_from = DB::connection()->getPdo()->quote($from);
            $from_col = DB::getDriverName() == 'sqlsrv' ? '[from]' : '`from`';
            $query->where('from', $from)->orWhereRaw("{$escaped_from} LIKE {$from_col}");
            if (Config::get('decoy::core.allow_regex_in_redirects')) {
                $query->orWhereRaw("{$escaped_from} REGEXP {$from_col}");
            }
        });
    }
public function scopeMatchUsingRequest ( $ query ) { return $ query -> where ( function ( $ query ) { $ from = $ this -> pathAndQuery ( ) ; $ escaped_from = DB :: connection ( ) -> getPdo ( ) -> quote ( $ from ) ; $ from_col = DB :: getDriverName ( ) == 'sqlsrv' ? '[from]' : '`from`' ; $ query -> where ( 'from' , $ from ) -> orWhereRaw ( "{$escaped_from} LIKE {$from_col}" ) ; if ( Config :: get ( 'decoy::core.allow_regex_in_redirects' ) ) { $ query -> orWhereRaw ( "{$escaped_from} REGEXP {$from_col}" ) ; } } ) ; }
See if the current request matches the "FROM" using progressively more
expensive ways to match the from column.

@param  Illuminate\Database\Query\Builder $query
@return void
See if the current request matches the FROM using progressively more expensive ways to match the from column .