Browse Source

replace db to database in DBNotification.php

mahdi
mahdihty 4 years ago
parent
commit
fb2e512c29
  1. 2
      app/Notifications/DBNotification.php
  2. 13
      app/Providers/AppServiceProvider.php
  3. 1
      database/migrations/2021_03_08_114700_create_notifications_table.php

2
app/Notifications/DBNotification.php

@ -29,7 +29,7 @@ class DBNotification extends Notification
*/
public function via($notifiable)
{
return ['db'];
return ['database'];
}
/**

13
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'),
);
});
});
}

1
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();

Loading…
Cancel
Save