Back

Artisans! I have a question.

In a package I'm creating the current way for using the class is by first using the Quickpay::api() method, and then tacking on any other method.

How could I change my code to skip this Quickpay::api()->payments()->create() and just go directly to Quickpay::payments()->create();

github.com/mortenebak/laravel-quickpay



Any help appriciated :)

2

206

Just use the facade?

1

311

Well. Thats kinda what I want to do, but struggling to grasp how 🫣

1

309

In response to @mortenebak

It should just work :) Just be sure you use the facade and not the actual implementation class

\Netbums\Quickpay\Facades\Quickpay::payments()->create();

1

184

  • No matching results...
  • Searching...

/ 1000

Thanks 👍 Next question that arises is the lack of autocomplete og methods 🫣

1

299