Nana-Odai
2 months ago
165
1
Laravel

How do i use HTTP_Request2 in class i have created in App

Posted 2 months ago by Nana-Odai

I have create a class in 'App\Helpers\tokens which i want to use HTTP_Request2, but i am gettting below error,

Class 'App\Helpers\HTTP_Request2' not found

what do i need to do. Below is my code

<?php 
use \App\Helpers\HTTP_Request2;
namespace App\Helpers;

Class Tokens{

    public static function tokens(){
        
        require_once 'HTTP/Request2.php';

        $request = new \Http_Request2('https://sandbox.momodeveloper.mtn.com/collection/token/');
        $url = $request->getUrl();

Please sign in or create an account to participate in this conversation.