Reputation: 5568
I'm trying to use Hash::make()
in my application and I'm having trouble getting it to work. I've been trying to use the documentation on the Laravel 3 site, since I can't find anything on the Laravel 4 documentation on it.
When I try to insert Hash::make($password)
into my database, it saves the value as 0. My field is varchar
and it has a length of 100, which should be long enough. I've tried inserting into different fields in my database, and it always saves as 0. I tried setting $password
to a test string, rather than what's coming from the form and it still saves as 0. If I insert $password
without the Hash::make()
it stores my password.
I tried echoing Hash::make('test
) on my page and I got nothing echoed back. No output at all. I guess that's why I'm inserting 0 into the database when I try to store the value.
Could this be related to the application key that you set with key:generate
through Artisan? I discovered I hadn't set that and when I tried to set it, it tells me it is already set? How do I reset the key?
Upvotes: 0
Views: 2122
Reputation: 60058
I suspect you do not have the MCrypt PHP extension enabled. You can run phpinfo()
to confirm.
Upvotes: 2