GlobalNames.php 732 B

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