We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc02263 commit 39c78dbCopy full SHA for 39c78db
src/Api2pdf.php
@@ -6,11 +6,15 @@
6
7
class Api2pdf
8
{
9
- /**
10
- * @return Client
11
- */
+ private Client $client;
+
12
public function __construct(array $config)
13
14
- return new Client($config['api_key']);
+ $this->client = new Client($config['api_key']);
+ }
15
16
+ public function client(): Client
17
+ {
18
+ return $this->client;
19
}
20
src/helpers.php
@@ -1,10 +1,9 @@
1
<?php
2
3
-use Api2Pdf\Api2Pdf as Client;
4
use Sawirricardo\Laravel\Api2pdf\Api2pdf;
5
if (! function_exists('api2pdf')) {
- function api2pdf(): Client
+ function api2pdf(): Api2pdf
return app(Api2pdf::class);
0 commit comments