forked from app-vise/laravel-appstore-notifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotificationsServiceProvider.php
31 lines (25 loc) · 1010 Bytes
/
NotificationsServiceProvider.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
<?php
namespace Appvise\AppStoreNotifications;
use Illuminate\Support\ServiceProvider;
class NotificationsServiceProvider extends ServiceProvider
{
public function boot()
{
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/../config/appstore-server-notifications.php' => config_path('appstore-server-notifications.php'),
], 'config');
}
if (! class_exists('CreateAppleNotificationsTable')) {
$timestamp = date('Y_m_d_His', time());
$this->publishes([
__DIR__.'/../database/migrations/create_apple_notifications_table.php.stub' => database_path("migrations/{$timestamp}_create_apple_notifications_table.php"),
], 'migrations');
}
$this->loadRoutesFrom(__DIR__.'/routes.php');
}
public function register()
{
$this->mergeConfigFrom(__DIR__.'/../config/appstore-server-notifications.php', 'appstore-server-notifications');
}
}