Skip to content

Commit 9bbfe4d

Browse files
authored
Merge pull request #42 from myckhel/ffix-php-warning
Fix php warning
2 parents 47f9a07 + b576751 commit 9bbfe4d

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

src/Traits/PaystackConfig.php renamed to src/PaystackConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
namespace Myckhel\Paystack\Traits;
3+
namespace Myckhel\Paystack;
44

55
use Illuminate\Support\Facades\Config;
66

77
/**
88
*
99
*/
10-
trait PaystackConfig
10+
class PaystackConfig
1111
{
1212
static function config(String $config = null)
1313
{

src/PaystackServiceProvider.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ public function register()
2929
);
3030
}
3131

32+
protected function registerPublishables(): void
33+
{
34+
$this->publishes([
35+
__DIR__ . '/../config/paystack.php' => config_path('paystack.php'),
36+
], 'config');
37+
}
38+
3239
/**
3340
* Get the services provided by the provider.
3441
*
@@ -46,6 +53,6 @@ function provides()
4653
*/
4754
public function boot()
4855
{
49-
//
56+
$this->registerPublishables();
5057
}
5158
}

src/Traits/Request.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Myckhel\Paystack\Traits;
44

55
use Illuminate\Support\Facades\Http;
6+
use Myckhel\Paystack\PaystackConfig;
67

78
class Props
89
{
@@ -20,7 +21,7 @@ trait Request
2021
{
2122
public static function config()
2223
{
23-
return new Props(PayStackConfig::config());
24+
return new Props(PaystackConfig::config());
2425
}
2526

2627
public static function post($endpoint, $params = [], $version = null)

src/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Myckhel\Paystack\Http\Controllers\DedicatedVirtualAccountController;
1010
use Myckhel\Paystack\Http\Controllers\DisputeController;
1111
use Myckhel\Paystack\Http\Controllers\TransactionController;
12-
use Myckhel\Paystack\Traits\PaystackConfig;
12+
use Myckhel\Paystack\PaystackConfig;
1313
use Myckhel\Paystack\Http\Controllers\HookController;
1414
use Myckhel\Paystack\Http\Controllers\InvoiceController;
1515
use Myckhel\Paystack\Http\Controllers\MiscellaneousController;

0 commit comments

Comments
 (0)