I need do to this:
$salt = bin2hex(hash::salt(32));
$hash = hash::make($pass, $salt);
But i received this:
Message: Class ‘App\DAO\MySQL\innhouse\hash’ not found
How can i do a “use” or “require once” to acess this class hash in Slim 3 please ?
In my other sistems without Slim i have no problem do to this.
The error message you’re seeing indicates that the
hash class cannot be found in the current namespace.
Ensure that your PHP file has the correct namespace declaration at the top.
Class names are usually writing in the UpperCamelCase (PascalCase or StudlyCaps) notation. Make sure the filename matches the class name (case sensitive) and has a
“Hash” class filename: “Hash.php”
Lastly, as a side note, it’s a good practice to avoid using reserved words as class names.
hash might be a bit misleading since PHP has a native hash extension. Consider renaming your class to something more descriptive to avoid potential confusion.
Thanks my friend; i found a class Hash.php in my old app; this is the solution to my problem.