Skip to content

Commit

Permalink
Use CLI command to install package and configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsMurumba committed Nov 3, 2022
1 parent 59ece36 commit dbee12f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/MpesaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Itsmurumba\Mpesa;

use Illuminate\Support\ServiceProvider;
use Itsmurumba\Mpesa\Console\InstallMpesaPackage;

class MpesaServiceProvider extends ServiceProvider
{
Expand All @@ -12,12 +13,10 @@ class MpesaServiceProvider extends ServiceProvider
*/
public function boot()
{
$config = realpath(__DIR__ . '/../resources/config/mpesa.php');

if ($this->app->runningInConsole()) {
$this->publishes([
$config => config_path('mpesa.php')
], 'mpesa-config');
$this->commands([
InstallMpesaPackage::class,
]);
}
}

Expand Down

0 comments on commit dbee12f

Please sign in to comment.