@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString(); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Get the profile picture url. |
|
| 35 | - * @return string |
|
| 36 | - */ |
|
| 33 | + /** |
|
| 34 | + * Get the profile picture url. |
|
| 35 | + * @return string |
|
| 36 | + */ |
|
| 37 | 37 | public function getProfilePictureAttribute($value) |
| 38 | 38 | { |
| 39 | 39 | return url(\Storage::url($value)); |
@@ -89,24 +89,24 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @return array |
| 91 | 91 | */ |
| 92 | - public function routeNotificationForFCM() |
|
| 93 | - { |
|
| 94 | - $devices = \Core::pushNotificationDevices()->findBy(['user_id' => $this->id]); |
|
| 95 | - $tokens = []; |
|
| 96 | - |
|
| 97 | - foreach ($devices as $device) |
|
| 98 | - { |
|
| 99 | - if (\Core::users()->accessTokenExpiredOrRevoked($device->access_token)) |
|
| 100 | - { |
|
| 101 | - $device->forceDelete(); |
|
| 102 | - continue; |
|
| 103 | - } |
|
| 104 | - |
|
| 105 | - $tokens[] = $device->device_token; |
|
| 106 | - } |
|
| 107 | - |
|
| 108 | - return $tokens; |
|
| 109 | - } |
|
| 92 | + public function routeNotificationForFCM() |
|
| 93 | + { |
|
| 94 | + $devices = \Core::pushNotificationDevices()->findBy(['user_id' => $this->id]); |
|
| 95 | + $tokens = []; |
|
| 96 | + |
|
| 97 | + foreach ($devices as $device) |
|
| 98 | + { |
|
| 99 | + if (\Core::users()->accessTokenExpiredOrRevoked($device->access_token)) |
|
| 100 | + { |
|
| 101 | + $device->forceDelete(); |
|
| 102 | + continue; |
|
| 103 | + } |
|
| 104 | + |
|
| 105 | + $tokens[] = $device->device_token; |
|
| 106 | + } |
|
| 107 | + |
|
| 108 | + return $tokens; |
|
| 109 | + } |
|
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | 112 | * The channels the user receives notification broadcasts on. |