inside Laravel Blade file I'm trying to achieve a simple password generator button that inputs generated password in field
Button:
<a class="btn btn-xs btn-success" onClick=generatePass()>Generate Me</a>
<script>
function generatePass() {
var hashed_random_password = Hash::make(str_random(12));
$('#password').val(hashed_random_password);
}
</script>
The button works, tested by using console.log('button clicked');
But hashing doesn't work, I need to achieve generating a hashed password and inputs it value directly into the password form field
Any suggestion how to get that simply in blade without invloving the routes and controller files?