unicodeveloper / laravel-paystack

:credit_card: :package: :moneybag: Laravel 6, 7, 8, 9, 10 and 11 Package for Paystack

Home Page:https://paystack.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined type 'Unicodeveloper\Paystack\Facades\Paystack'

iampapagray opened this issue · comments

Thank you for this library.

I'm using this on Laravel 9.
i added 'Paystack' => Unicodeveloper\Paystack\Facades\Paystack::class, to my config/app.php in the aliases array like so:

'aliases' => Facade::defaultAliases()->merge([
        'Carbon' => Illuminate\Support\Carbon::class,
        'Paystack' => Unicodeveloper\Paystack\Facades\Paystack::class,
    ])->toArray(),

However, in my controller when i do Paystack::getAllCustomers() VSCode underlines Paystack.
And intelliphense gives error message as Undefined type 'Unicodeveloper\Paystack\Facades\Paystack'

Is there something i'm missing? Kindly help

Your controller is missing **use Paystack;** at the top

I'm having same issues here even when i have referenced the use Paystack at the top

I'm having same issues here even when i have referenced the use Paystack at the top

Did you...

Also, register the Facade like so:

'aliases' => [
    ...
    'Paystack' => Unicodeveloper\Paystack\Facades\Paystack::class,
    ...
]