There is a function-helper:

function getiso ($v) { $ip = geoip($v[1].'.'.$v[2].'.'.$v[3].'.'.$v[4]); return $ip->iso_code; } 

https://stackoverflow.com/questions/32419619/how-do-i-make-global-helper-functions-in-laravel-5 by analogy

Trying to reach her in the query:

 $rq->whereRaw('getiso(ip) = ?', $iso); 

and get:

message SQLSTATE [HY000]: General error: 1 no such function: getiso (SQL: select count (*) as aggregate from "proc" where getiso (ip) = RU)

What is wrong doing?

    0