I created a new Lumen 5.4 project and tried to seed some data. In the seeder, I used bcrypt to hash the password. But when I run php artisan db:seed
, I get this error:
Call to undefined function bcrypt()
Why can't I use bcrypt in Lumen? I have used it in Laravel previously.
You could try:
app('hash')->make('yourpassword');
another solution would be to use Facades\Hash
use Illuminate\Support\Facades\Hash;
code
'password' => Hash::make('your_password')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With