Explorar el Código

update: add subscribe flag

Tokumeikoi hace 4 años
padre
commit
bf4e63ed9f
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      app/Http/Controllers/Client/ClientController.php

+ 2 - 3
app/Http/Controllers/Client/ClientController.php

@@ -21,10 +21,9 @@ class ClientController extends Controller
     public function subscribe(Request $request)
     {
         $flag = $request->input('flag')
-            ? $request->input('flag')
-            : isset($_SERVER['HTTP_USER_AGENT'])
+            ?? (isset($_SERVER['HTTP_USER_AGENT'])
                 ? $_SERVER['HTTP_USER_AGENT']
-                : '';
+                : '');
         $flag = strtolower($flag);
         $user = $request->user;
         // account not expired and is not banned.