GlobalNames.php 681 B

123456789101112131415161718192021222324252627
  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. define('CREDITS_DISPLAY_NAME', config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME', 'Credits'));
  17. $unsupported_lang_array = explode(',', config('app.unsupported_locales'));
  18. $unsupported_lang_array = array_map('strtolower', $unsupported_lang_array);
  19. define('UNSUPPORTED_LANGS', $unsupported_lang_array);
  20. return $next($request);
  21. }
  22. }