v2 first commit

This commit is contained in:
denisdulici
2019-11-16 10:21:14 +03:00
parent 5b23e9c2c4
commit 6d50fa8442
3075 changed files with 3451681 additions and 65594 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace Modules\OfflinePayments\Listeners;
use App\Events\Module\PaymentMethodShowing as Event;
class ShowPaymentMethod
{
/**
* Handle the event.
*
* @param Event $event
* @return void
*/
public function handle(Event $event)
{
$methods = json_decode(setting('offline-payments.methods'), true);
foreach ($methods as $method) {
$event->modules->payment_methods[] = $method;
}
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Modules\OfflinePayments\Listeners;
use App\Events\Module\SettingShowing as Event;
class ShowSetting
{
/**
* Handle the event.
*
* @param Event $event
* @return void
*/
public function handle(Event $event)
{
$event->modules->settings['offline-payments'] = [
'name' => trans('offline-payments::general.name'),
'description' => trans('offline-payments::general.description'),
'url' => 'settings/offline-payments',
'icon' => 'fas fa-credit-card',
];
}
}