-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInboxProcessServiceProvider.php
44 lines (35 loc) · 1.16 KB
/
InboxProcessServiceProvider.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
<?php
namespace ShipSaasInboxProcess;
use Illuminate\Foundation\Console\AboutCommand;
use Illuminate\Support\ServiceProvider;
use ShipSaasInboxProcess\Commands\InboxWorkCommand;
use ShipSaasInboxProcess\Core\Lifecycle;
class InboxProcessServiceProvider extends ServiceProvider
{
public function boot(): void
{
AboutCommand::add(
'ShipSaaS: Laravel Inbox Process',
fn () => ['Version' => 'v1.1.1']
);
$this->mergeConfigFrom(
__DIR__ . '/Configs/inbox.php',
'inbox'
);
$this->loadRoutesFrom(__DIR__ . '/Routes/inbox_routes.php');
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__ . '/Database/Migrations/' => database_path('migrations'),
__DIR__ . '/Configs/inbox.php' => config_path('inbox.php'),
], 'laravel-inbox-process');
$this->commands([
InboxWorkCommand::class,
]);
$this->app->booted(fn () => $this->app->make(Lifecycle::class));
}
}
public function register(): void
{
$this->app->singleton(Lifecycle::class);
}
}