forked from misaghamouie/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GatewayServiceProviderLaravel4.php
55 lines (43 loc) · 1.18 KB
/
GatewayServiceProviderLaravel4.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace Larabookir\Gateway;
use Illuminate\Support\Facades\File;
use Illuminate\Support\ServiceProvider;
class GatewayServiceProviderLaravel4 extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
$config = __DIR__ . '/../config/gateway.php';
$migrations = __DIR__ . '/../migrations/';
$views = __DIR__ . '/../views/';
// for laravel 4.2
$this->package('larabook/gateway',null,__DIR__.'/../');
if (
File::glob(base_path('/database/migrations/*create_gateway_status_log_table\.php'))
&& !File::exists(base_path('/database/migrations/2017_04_05_103357_alter_id_in_transactions_table.php'))
) {
@File::copy($migrations.'/2017_04_05_103357_alter_id_in_transactions_table.php',base_path('database/migrations/2017_04_05_103357_alter_id_in_transactions_table.php'));
}
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
$this->app->singleton('gateway', function () {
return new GatewayResolver();
});
}
}