-4

This code generates hashed password

class Token {
    public static function generate()
    {
        return Session::put(Config::get('session/token_name'), md5(uniqid()));
    }

    public static function check($token)
    {
        $tokenName = Config::get('session/token_name');

        if (Session::exists($tokenName) && $token === Session::get($tokenName)) 
        {
            return true;
        }

        return false;
    }
}

But then I can't debug this program , please what's wrong it. thanks in ADVANCE

Favour Emmanuel
  • 111
  • 3
  • 11
  • 2
    Seems to be a duplicate of https://stackoverflow.com/questions/4684454/error-message-strict-standards-non-static-method-should-not-be-called-staticall#answer-4684514 or https://stackoverflow.com/questions/19693946/non-static-method-should-not-be-called-statically – WebElaine Apr 11 '18 at 21:35
  • I see no question – jirig Apr 11 '18 at 21:58

1 Answers1

0

You need to change your Session class get function declaration.

From:

function get()

to:

public static function get()

Mat
  • 958
  • 8
  • 18