src/User/EmailToken.php
public static function generate($email, $userId)
    {
        $token = new static;

        $token->token = str_random(40);
        $token->user_id = $userId;
        $token->email = $email;
        $token->created_at = Carbon::now();

        return $token;
    }
public static function generate($email, $userId)
    {
        $token = new static;

        $token->token = str_random(40);
        $token->user_id = $userId;
        $token->email = $email;
        $token->created_at = Carbon::now();

        return $token;
    }
public static function generate ( $ email , $ userId ) { $ token = new static ; $ token -> token = str_random ( 40 ) ; $ token -> user_id = $ userId ; $ token -> email = $ email ; $ token -> created_at = Carbon :: now ( ) ; return $ token ; }
Generate an email token for the specified user.

@param string $email
@param int $userId

@return static
Generate an email token for the specified user .