refs #6 fixed update offline module issue.
This commit is contained in:
parent
fa3ab7f9bb
commit
a66fe78ad3
@ -1,27 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayment\Providers;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
use Artisan;
|
||||
use Module;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class OfflineServiceProvider extends ServiceProvider
|
||||
class OfflineFile extends Migration
|
||||
{
|
||||
/**
|
||||
* Indicates if loading of the provider is deferred.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $defer = false;
|
||||
|
||||
/**
|
||||
* Boot the application events.
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
public function up()
|
||||
{
|
||||
$module = Module::get('Offline');
|
||||
|
||||
@ -44,6 +33,11 @@ class OfflineServiceProvider extends ServiceProvider
|
||||
);
|
||||
}
|
||||
|
||||
//$company_id = $this->command->argument('company');
|
||||
|
||||
// Set the active company settings
|
||||
setting()->setExtraColumns(['company_id' => 1]);
|
||||
|
||||
setting()->set('offlinepayment.methods', json_encode($offlinepayment));
|
||||
|
||||
setting()->forget('offline.payment.methods');
|
||||
@ -56,4 +50,14 @@ class OfflineServiceProvider extends ServiceProvider
|
||||
Artisan::call('cache:clear');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -32,6 +32,8 @@ class OfflinePaymentServiceProvider extends ServiceProvider
|
||||
$this->registerViews();
|
||||
$this->registerFactories();
|
||||
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||
|
||||
$this->app['events']->listen(AdminMenuCreated::class, OfflinePaymentAdminMenu::class);
|
||||
$this->app['events']->listen(PaymentGatewayListing::class, OfflinePaymentGateway::class);
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
"active": 1,
|
||||
"order": 0,
|
||||
"providers": [
|
||||
"Modules\\OfflinePayment\\Providers\\OfflineServiceProvider",
|
||||
"Modules\\OfflinePayment\\Providers\\OfflinePaymentServiceProvider"
|
||||
],
|
||||
"aliases": {},
|
||||
|
Loading…
x
Reference in New Issue
Block a user