christopher's avatar

Lumen Hash::check

Does someone know why Hash::check does not work in lumen ? This is my little routes.php test file

<?php

use Illuminate\Support\Facades\Hash;

$app->get('/', function () use ($app) {
    $test = bcrypt("test");

    if (Hash::check('test', $test)) {
        echo "matched";
    }
}
...

And if i use Hash::check i get Fatal error: Call to a member function check() on null in /home/vagrant/Code/lumen/vendor/illuminate/support/Facades/Facade.php on line 213 But the check method exist.

0 likes
2 replies
thomaskim's avatar
Level 41

Lumen doesn't support facades out of the box. Did you uncomment $app->withFacades(); in your bootstrap/app.php file?

1 like

Please or to participate in this conversation.