Merge branch 'master' of github.com:akaunting/akaunting

This commit is contained in:
cuneytsenturk 2018-12-19 15:37:33 +03:00
commit 24c34252be
5 changed files with 12 additions and 24 deletions

View File

@ -2,10 +2,9 @@
namespace Modules\OfflinePayment\Listeners;
use Auth;
use App\Events\AdminMenuCreated;
class OfflinePaymentAdminMenu
class AdminMenu
{
/**
@ -16,7 +15,7 @@ class OfflinePaymentAdminMenu
*/
public function handle(AdminMenuCreated $event)
{
$user = Auth::user();
$user = auth()->user();
// Settings
if ($user->can(['read-settings-settings', 'read-settings-categories', 'read-settings-currencies', 'read-settings-taxes'])) {

View File

@ -4,7 +4,7 @@ namespace Modules\OfflinePayment\Listeners;
use App\Events\PaymentGatewayListing;
class OfflinePaymentGateway
class Gateway
{
/**
* Handle the event.

View File

@ -2,13 +2,11 @@
namespace Modules\OfflinePayment\Providers;
use Illuminate\Support\ServiceProvider;
use App\Events\AdminMenuCreated;
use Modules\OfflinePayment\Listeners\OfflinePaymentAdminMenu;
use App\Events\PaymentGatewayListing;
use Modules\OfflinePayment\Listeners\OfflinePaymentGateway;
use Illuminate\Support\ServiceProvider;
use Modules\OfflinePayment\Listeners\AdminMenu;
use Modules\OfflinePayment\Listeners\Gateway;
class OfflinePaymentServiceProvider extends ServiceProvider
{
@ -29,7 +27,6 @@ class OfflinePaymentServiceProvider extends ServiceProvider
$this->registerTranslations();
$this->registerViews();
$this->registerMigrations();
$this->registerEvents();
}
@ -86,8 +83,8 @@ class OfflinePaymentServiceProvider extends ServiceProvider
public function registerEvents()
{
$this->app['events']->listen(AdminMenuCreated::class, OfflinePaymentAdminMenu::class);
$this->app['events']->listen(PaymentGatewayListing::class, OfflinePaymentGateway::class);
$this->app['events']->listen(AdminMenuCreated::class, AdminMenu::class);
$this->app['events']->listen(PaymentGatewayListing::class, Gateway::class);
}
/**

View File

@ -4,7 +4,7 @@ namespace Modules\PaypalStandard\Listeners;
use App\Events\PaymentGatewayListing;
class PaypalStandardGateway
class Gateway
{
/**
* Handle the event.

View File

@ -2,10 +2,9 @@
namespace Modules\PaypalStandard\Providers;
use Illuminate\Support\ServiceProvider;
use App\Events\PaymentGatewayListing;
use Modules\PaypalStandard\Listeners\PaypalStandardGateway;
use Illuminate\Support\ServiceProvider;
use Modules\PaypalStandard\Listeners\Gateway;
class PaypalStandardServiceProvider extends ServiceProvider
{
@ -25,8 +24,6 @@ class PaypalStandardServiceProvider extends ServiceProvider
{
$this->registerTranslations();
$this->registerViews();
$this->registerMigrations();
$this->registerEvents();
}
@ -76,14 +73,9 @@ class PaypalStandardServiceProvider extends ServiceProvider
}
}
public function registerMigrations()
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
}
public function registerEvents()
{
$this->app['events']->listen(PaymentGatewayListing::class, PaypalStandardGateway::class);
$this->app['events']->listen(PaymentGatewayListing::class, Gateway::class);
}
/**