@laracoft you sure deactivating really works? Meaning you can see on your database that is_active becomes 1?
Also, I don't see any point in doing ->fresh().
$updated = Device::where('id', $d->id)->first(); // this should be fine
I think the issue is here:
$response = $this->call('GET', "/activate/{$da->hash}");
Your code below is running while in fact the device is not yet activated. You can confirm it by:
$response = $this->call('GET', "/activate/{$da->hash}");
$updated = Device::where('id', $d->id)->first();
dd($updated->is_active);
if it shows 0 then that's really the issue.