ixudra / curl

Custom PHP curl library for the Laravel 5 framework - developed by Ixudra

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error Class 'Ixudra\Curl\CurlServiceProvider' not found

billyanto opened this issue · comments

hai ixuda, i'm here working on project using laravel 5.5, after using composer require ixudra/curl and put some code from my controller, i got this error 'Ixudra\Curl\CurlServiceProvider' not found, after that i trying to put "ixudra/curl": "6.*" to composer then i run composer update, but it's still error, i allso trying adding your code at config/app.php but it show same error

this is code at my controller

use App\Veritrans\Veritrans;

class CheckOutController extends Controller
{
    public function index()
    {
        $response = Curl::to('https://api.sandbox.midtrans.com/v2/token')
        ->withData( array( 'card_number' => '4811111111111114 ' ) )
        ->withData( array( 'card_cvv' => '123 ' ) )
        ->withData( array( 'card_exp_month' => '01 ' ) )
        ->withData( array( 'card_exp_year' => '2020 ' ) )
        ->withData( array( 'client_key' => 'xxxxxxxxxxxxxx ' ) )
        ->withHeader('Authorization: xxxxxxxxxxxxxxxxxxxxxxxxx')
        ->withHeader('Accept: Content-Type')
        ->withHeader('Content-Type: Content-Type')
        ->asJson()
        ->get();

        return response()->json($response);
    }

Can you check and see which version exactly of the package you have installed?

Also, have you tried adding the service provider to the app.php file as specified in the readme? I know auto-discover should do it's thing but adding the provider is a good fallback

i have to change mp composer stuff, i think i can close this issue, thanks