|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace ElfSundae\Laravel\Support; |
|
4
|
|
|
|
|
5
|
|
|
use Illuminate\Support\ServiceProvider; |
|
6
|
|
|
|
|
7
|
|
|
class SupportServiceProvider extends ServiceProvider |
|
8
|
|
|
{ |
|
9
|
|
|
/** |
|
10
|
|
|
* Register the service provider. |
|
11
|
|
|
* |
|
12
|
|
|
* @return void |
|
13
|
|
|
*/ |
|
14
|
|
|
public function register() |
|
15
|
|
|
{ |
|
16
|
|
|
$this->mergeConfigFrom(__DIR__.'/../config/support.php', 'support'); |
|
17
|
|
|
|
|
18
|
|
|
$this->registerServices(); |
|
19
|
|
|
|
|
20
|
|
|
if ($this->app->isLocal()) { |
|
21
|
|
|
$this->registerForLocalEnvironment(); |
|
22
|
|
|
} |
|
23
|
|
|
|
|
24
|
|
|
if ($this->app->runningInConsole()) { |
|
25
|
|
|
$this->registerForConsole(); |
|
26
|
|
|
} |
|
27
|
|
|
} |
|
28
|
|
|
|
|
29
|
|
|
public function registerServices() |
|
30
|
|
|
{ |
|
31
|
|
|
$this->app->register(\ElfSundae\Laravel\Api\ApiServiceProvider::class); |
|
32
|
|
|
$this->app->register(\Intervention\Image\ImageServiceProviderLaravel5::class); |
|
33
|
|
|
$this->app->register(\NotificationChannels\BearyChat\BearyChatServiceProvider::class); |
|
34
|
|
|
$this->app->register(\SimpleSoftwareIO\QrCode\QrCodeServiceProvider::class); |
|
35
|
|
|
$this->app->register(\Vinkla\Hashids\HashidsServiceProvider::class); |
|
36
|
|
|
$this->app->register(\Yajra\Datatables\DatatablesServiceProvider::class); |
|
37
|
|
|
$this->app->register(\Yajra\Datatables\ButtonsServiceProvider::class); |
|
38
|
|
|
$this->app->register(\ElfSundae\Laravel\Support\Datatables\DatatablesServiceProvider::class); |
|
39
|
|
|
$this->app->register(Providers\AppConfigServiceProvider::class); |
|
40
|
|
|
$this->app->register(Providers\CaptchaServiceProvider::class); |
|
41
|
|
|
$this->app->register(Providers\ClientServiceProvider::class); |
|
42
|
|
|
$this->app->register(Providers\OptimusServiceProvider::class); |
|
43
|
|
|
$this->app->register(Providers\RoutingServiceProvider::class); |
|
44
|
|
|
$this->app->register(Providers\XgPusherServiceProvider::class); |
|
45
|
|
|
|
|
46
|
|
|
Helper::aliasFacade('Captcha', \Mews\Captcha\Facades\Captcha::class); |
|
47
|
|
|
Helper::aliasFacade('Image', \Intervention\Image\Facades\Image::class); |
|
48
|
|
|
Helper::aliasFacade('Qrcode', \SimpleSoftwareIO\QrCode\Facades\QrCode::class); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function registerForLocalEnvironment() |
|
52
|
|
|
{ |
|
53
|
|
|
$this->app->register(\Barryvdh\Debugbar\ServiceProvider::class); |
|
54
|
|
|
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* Register for console. |
|
59
|
|
|
* |
|
60
|
|
|
* @return void |
|
61
|
|
|
*/ |
|
62
|
|
|
protected function registerForConsole() |
|
63
|
|
|
{ |
|
64
|
|
|
$this->app->register(\Laravel\Tinker\TinkerServiceProvider::class); |
|
65
|
|
|
$this->app->register(\Spatie\Backup\BackupServiceProvider::class); |
|
66
|
|
|
$this->app->register(Providers\ConsoleServiceProvider::class); |
|
67
|
|
|
|
|
68
|
|
|
$this->publishes([ |
|
69
|
|
|
__DIR__.'/../config/support.php' => config_path('support.php'), |
|
70
|
|
|
], 'laravel-support'); |
|
71
|
|
|
} |
|
72
|
|
|
} |
|
73
|
|
|
|