-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSaderatServiceProvider.php
More file actions
55 lines (48 loc) · 1.37 KB
/
SaderatServiceProvider.php
File metadata and controls
55 lines (48 loc) · 1.37 KB
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\Saderat;
/**
* @Author Hamed Pakdaman - pakdaman.it@gmail.com
* @website larabook.ir
* @link https://github.com/larabook/gateway/
* @version 1.00
*/
use Illuminate\Support\ServiceProvider;
class SaderatServiceProvider 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/saderat.php';
$views = __DIR__ . '/Views/';
//php artisan vendor:publish --provider=Larabookir\Saderat\SaderatServiceProvider --tag=config
$this->publishes([
$config => config_path('saderat.php'),
], 'config');
$this->loadViewsFrom($views, 'saderat');
// php artisan vendor:publish --provider=Larabookir\Saderat\SaderatServiceProvider --tag=views
$this->publishes([
$views => base_path('resources/views/vendor/saderat'),
], 'views');
//$this->mergeConfigFrom( $config,'gateway')
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
$this->app->singleton('saderat', function () {
return new SaderatResolver();
});
}
}