Strange eloquent issue on heroku


#1

got a realy strange error with eloquent running slim v3 on heroku (php 7.1.*)

following code

$licenseID = \App\Models\Licenses::whereRaw('LicenseKeyMD5 = :lic_key',['lic_key'=>$lic_key])->value('LicenseID');

is working fine on my local dev and actually making proper query on database, if i run the same on heroku it trying to run following query, without replacing the :lic_key ?!.

"error": "SQLSTATE[HY000] [2002] (SQL: select LicenseID from Licenses where LicenseKeyMD5 = :lic_key limit 1)",

any idea ?


#3

nvm. solved. was issue with certificate on connection :slight_smile:


#4

Try out the where method. Example:

$licenseID = \App\Models\Licenses::where('LicenseKeyMD5', '=', $lic_key)->value('LicenseID');