diff --git a/src/Traits/HasDevices.php b/src/Traits/HasDevices.php index 12b808a..00a3048 100644 --- a/src/Traits/HasDevices.php +++ b/src/Traits/HasDevices.php @@ -35,13 +35,9 @@ public function devicesWithAgents() * * @return array|null */ - public function getFcmListArrtibute() + public function getFcmListAttribute() { - $list = $this->devices()->whereNotNull('fcm_token')->where('logged_out', false)->get(); - if ($list->isEmpty()) - return null; - - return $list->pluck('fcm_token')->toArray(); + return $this->devices()->whereNotNull('fcm_token')->where('logged_out', false)->pluck('fcm_token')->toArray(); } /**