From 2ad56b02a6665ebaccd73eecd0cfb1e8b7cb8484 Mon Sep 17 00:00:00 2001 From: Jack Goh Date: Thu, 16 Aug 2018 10:58:54 +0800 Subject: [PATCH] removed notification seeder updated boardcasting config added rate updated notification file --- app/Notifications/RateUpdated.php | 61 ++++++++++++++++++++++ app/Providers/BroadcastServiceProvider.php | 4 +- composer.json | 1 + config/app.php | 2 +- config/broadcasting.php | 3 +- database/seeds/DatabaseSeeder.php | 1 - 6 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 app/Notifications/RateUpdated.php diff --git a/app/Notifications/RateUpdated.php b/app/Notifications/RateUpdated.php new file mode 100644 index 00000000..65781b64 --- /dev/null +++ b/app/Notifications/RateUpdated.php @@ -0,0 +1,61 @@ +line('The introduction to the notification.') + ->action('Notification Action', url('/')) + ->line('Thank you for using our application!'); + } + + /** + * Get the array representation of the notification. + * + * @param mixed $notifiable + * @return array + */ + public function toArray($notifiable) + { + return [ + // + ]; + } +} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 352cce44..7a5e15ab 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -14,8 +14,8 @@ class BroadcastServiceProvider extends ServiceProvider */ public function boot() { - Broadcast::routes(); - + //Broadcast::routes(); + Broadcast::routes(["middleware" => ["auth:api"]]); require base_path('routes/channels.php'); } } diff --git a/composer.json b/composer.json index 3ae12a1a..97b020e5 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,7 @@ "laravel/socialite": "^3.0", "laravel/tinker": "~1.0", "laravelcollective/html": "^5.6", + "pusher/pusher-php-server": "~3.0", "tymon/jwt-auth": "^1.0.0-rc.2", "zizaco/entrust": "dev-master" }, diff --git a/config/app.php b/config/app.php index 3d40b81c..1c1d20d4 100644 --- a/config/app.php +++ b/config/app.php @@ -165,7 +165,7 @@ return [ */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, - // App\Providers\BroadcastServiceProvider::class, + App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, diff --git a/config/broadcasting.php b/config/broadcasting.php index 5eecd2b2..3ca45eaa 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -36,7 +36,8 @@ return [ 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - // + 'cluster' => env('PUSHER_APP_CLUSTER'), + 'encrypted' => true, ], ], diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index e0ba98e9..ebc04e05 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -28,7 +28,6 @@ class DatabaseSeeder extends Seeder $this->call(SettingActiveBankSeeder::class); $this->call(SettingTaxRateSeeder::class); $this->call(SettingBillingChargeSeeder::class); - $this->call(NotificationSeeder::class); DB::statement('SET FOREIGN_KEY_CHECKS=1;'); } }