GlobalNames.php 580 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Http\Middleware;
  3. use Closure;
  4. use Illuminate\Http\Request;
  5. class GlobalNames
  6. {
  7. /**
  8. * Handle an incoming request.
  9. *
  10. * @param Request $request
  11. * @param Closure $next
  12. * @return mixed
  13. */
  14. public function handle(Request $request, Closure $next)
  15. {
  16. $unsupported_lang_array = explode(',', config('app.unsupported_locales'));
  17. $unsupported_lang_array = array_map('strtolower', $unsupported_lang_array);
  18. define('UNSUPPORTED_LANGS', $unsupported_lang_array);
  19. return $next($request);
  20. }
  21. }