@@ -24,14 +24,14 @@ |
||
24 | 24 | } |
25 | 25 | // https://segmentfault.com/q/1010000000672529/a-1020000000679702 |
26 | 26 | $this->createTable($this->tableName, [ |
27 | - 'id' => $this->char(36)->notNull()->comment('Id'),//通知ID |
|
27 | + 'id' => $this->char(36)->notNull()->comment('Id'), //通知ID |
|
28 | 28 | 'verb' => $this->string(32), |
29 | - 'notifiable_id' => $this->unsignedInteger()->notNull()->comment('Entity'),//通知实体ID |
|
30 | - 'notifiable_class' => $this->string()->notNull()->comment('Entity'),//通知实体类名 |
|
29 | + 'notifiable_id' => $this->unsignedInteger()->notNull()->comment('Entity'), //通知实体ID |
|
30 | + 'notifiable_class' => $this->string()->notNull()->comment('Entity'), //通知实体类名 |
|
31 | 31 | 'data' => $this->text(), |
32 | - 'read_at' => $this->unixTimestamp()->comment('Read At'),//阅读时间 |
|
33 | - 'created_at' => $this->unixTimestamp()->notNull()->comment('Created At'),//创建时间 |
|
34 | - 'updated_at' => $this->integer(10)->unsigned()->notNull()->comment('Updated At'),//更新时间 |
|
32 | + 'read_at' => $this->unixTimestamp()->comment('Read At'), //阅读时间 |
|
33 | + 'created_at' => $this->unixTimestamp()->notNull()->comment('Created At'), //创建时间 |
|
34 | + 'updated_at' => $this->integer(10)->unsigned()->notNull()->comment('Updated At'), //更新时间 |
|
35 | 35 | ], $tableOptions); |
36 | 36 | $this->createIndex('notification_notifiable', $this->tableName, ['notifiable_id', 'notifiable_class']); |
37 | 37 | } |
@@ -287,7 +287,7 @@ |
||
287 | 287 | */ |
288 | 288 | protected function sendToNotifiable($notifiable, $id, $notification, $channel) |
289 | 289 | { |
290 | - if (! $notification->id) { |
|
290 | + if (!$notification->id) { |
|
291 | 291 | $notification->id = $id; |
292 | 292 | } |
293 | 293 | if (!$notifiable->shouldReceiveNotification($notification)) { |
@@ -62,8 +62,8 @@ |
||
62 | 62 | ->setSubject($message->title) |
63 | 63 | ->send(); |
64 | 64 | |
65 | - if (! $notifiable->routeNotificationFor('mail') && |
|
66 | - ! $message instanceof Mailable) { |
|
65 | + if (!$notifiable->routeNotificationFor('mail') && |
|
66 | + !$message instanceof Mailable) { |
|
67 | 67 | return; |
68 | 68 | } |
69 | 69 |