refs #6 fixed update offline module issue.

This commit is contained in:
cuneytsenturk 2017-09-19 15:47:55 +03:00
parent fa3ab7f9bb
commit a66fe78ad3
3 changed files with 23 additions and 18 deletions

View File

@ -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()
{
}
}

View File

@ -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);
}

View File

@ -8,7 +8,6 @@
"active": 1,
"order": 0,
"providers": [
"Modules\\OfflinePayment\\Providers\\OfflineServiceProvider",
"Modules\\OfflinePayment\\Providers\\OfflinePaymentServiceProvider"
],
"aliases": {},