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