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 11, 2024
1 parent 78e8b04 commit 22bc454
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Traits/HasDevices.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function devicesWithAgents()
public function getFcmListArrtibute()
{
$list = $this->devices()->whereNotNull('fcm_token')->where('logged_out', false)->get();

if ($list->isEmpty())
return null;

Expand Down Expand Up @@ -144,7 +143,7 @@ public function getCurrentDeviceAttribute()
*/
public function getCurrentDeviceWithAgentAttribute()
{
if (!($device = $this->CurrentDevice()))
if (!($device = $this->currentDevice))
return null;

$device->load(['agent.operationSystem', 'agent.browser', 'agent.device']);
Expand Down

0 comments on commit 22bc454

Please sign in to comment.