$data['token']], [ 'user_id' => Auth::id(), 'platform' => $data['platform'], 'app_type' => $data['app_type'], 'active' => true, ] ); } public function remove(string $token): void { DeviceToken::where('token', $token) ->where('user_id', Auth::id()) ->update(['active' => false]); } }