From fb2e512c29a24e423e5550417357f4d0895f6a65 Mon Sep 17 00:00:00 2001 From: mahdihty Date: Tue, 16 Mar 2021 19:19:36 +0330 Subject: [PATCH] replace db to database in DBNotification.php --- app/Notifications/DBNotification.php | 2 +- app/Providers/AppServiceProvider.php | 13 +++++++++---- ...2021_03_08_114700_create_notifications_table.php | 1 - 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/Notifications/DBNotification.php b/app/Notifications/DBNotification.php index 1711b56..61a553f 100644 --- a/app/Notifications/DBNotification.php +++ b/app/Notifications/DBNotification.php @@ -29,7 +29,7 @@ class DBNotification extends Notification */ public function via($notifiable) { - return ['db']; + return ['database']; } /** diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 77c57a4..d757d16 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -27,11 +27,16 @@ class AppServiceProvider extends ServiceProvider $service->extend('socket', function ($app) { return new SocketChannel(new HttpClient, config('socket.url')); }); - $service->extend('db', function ($app) { - return new DBChannel(); - }); +// $service->extend('db', function ($app) { +// return new DBChannel(); +// }); $service->extend('sms', function ($app) { - return new SmsChannel(new HttpClient, config('smsirlaravel.webservice-url')); + return new SmsChannel( + new HttpClient, + config('smsirlaravel.webservice-url'), + config('smsirlaravel.api-key'), + config('smsirlaravel.secret-key'), + ); }); }); } diff --git a/database/migrations/2021_03_08_114700_create_notifications_table.php b/database/migrations/2021_03_08_114700_create_notifications_table.php index 16b08ad..9797596 100644 --- a/database/migrations/2021_03_08_114700_create_notifications_table.php +++ b/database/migrations/2021_03_08_114700_create_notifications_table.php @@ -17,7 +17,6 @@ class CreateNotificationsTable extends Migration $table->uuid('id')->primary(); $table->string('type'); $table->morphs('notifiable'); - $table->unsignedBigInteger('business_id'); $table->text('data'); $table->timestamp('read_at')->nullable(); $table->timestamps();