public function createLoginToken($userID) {
        $user = $this->getFind($userID);

        $user->login_token            = hash_hmac('sha256', Str::random(40), 'secret');
        $user->login_token_created_at = Carbon::now();

        return $user->save();
    }
public function createLoginToken($userID) {
        $user = $this->getFind($userID);

        $user->login_token            = hash_hmac('sha256', Str::random(40), 'secret');
        $user->login_token_created_at = Carbon::now();

        return $user->save();
    }
public function createLoginToken ( $ userID ) { $ user = $ this -> getFind ( $ userID ) ; $ user -> login_token = hash_hmac ( 'sha256' , Str :: random ( 40 ) , 'secret' ) ; $ user -> login_token_created_at = Carbon :: now ( ) ; return $ user -> save ( ) ; }
UPDATE the "users" table with a login token

@param  int  $userID    User's ID
UPDATE the users table with a login token