-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathBlockBotsServiceProvider.php
executable file
·53 lines (45 loc) · 1.22 KB
/
BlockBotsServiceProvider.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
<?php
namespace Potelo\LaravelBlockBots;
use Illuminate\Support\ServiceProvider;
use Potelo\LaravelBlockBots\Commands\ClearWhitelist;
use Potelo\LaravelBlockBots\Commands\ListWhitelist;
use Potelo\LaravelBlockBots\Commands\ListHits;
use Potelo\LaravelBlockBots\Commands\ListNotified;
class BlockBotsServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
if ($this->app->runningInConsole()) {
$this->commands([
ClearWhitelist::class,
ListWhitelist::class,
ListHits::class,
ListNotified::class,
]);
}
$this->publishes([
__DIR__ . '/config/block-bots.php' => config_path('block-bots.php'),
], 'config');
$this->loadViewsFrom(__DIR__ . '/views', 'block-bots');
$this->publishes([
__DIR__ . '/views' => resource_path('views/vendor/block-bots'),
]);
}
/**
* Register services.
*
* @return void
*/
public function register()
{
$this->mergeConfigFrom(
__DIR__ . '/config/block-bots.php',
'block-bots'
);
}
}