Put sha1 ($str,true) into sqlsrv in laravel?

1. Such as the title.

2.laravel reported an error The Response content must be a string or object implementing _ _ toString (), "boolean" given.
looked up some information and said that the json_encode illegal character is the binary.

3. Using the native sql statement, it doesn"t work, so I don"t know what to do for the time being. Ask for help.

Mar.23,2021

finally uses the HASHBYTES ('SHA1',$str) that comes with sqlsrv, and then inserts it.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bc4b-43dd5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bc4b-43dd5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?