Skip to content

Commit

Permalink
Update HasDevices.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MoamenEltouny committed Mar 13, 2024
1 parent 090c400 commit 76e819a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Traits/HasDevices.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit 76e819a

Please sign in to comment.