Andrew Wallo 3 meses atrás
pai
commit
8935174752
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5
    1
      app/Http/Middleware/ConfigureCurrentCompany.php

+ 5
- 1
app/Http/Middleware/ConfigureCurrentCompany.php Ver arquivo

@@ -22,7 +22,11 @@ class ConfigureCurrentCompany
22 22
         $company = Filament::getTenant();
23 23
 
24 24
         if ($company) {
25
-            CompanyConfigured::dispatch($company);
25
+            $currentCompanyId = session('current_company_id');
26
+
27
+            if ($currentCompanyId !== $company->id) {
28
+                CompanyConfigured::dispatch($company);
29
+            }
26 30
         }
27 31
 
28 32
         return $next($request);

Carregando…
Cancelar
Salvar