2021-08-02 17:25:33 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
|
|
|
|
use Closure;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
2021-12-23 08:09:39 +00:00
|
|
|
class GlobalNames
|
2021-08-02 17:25:33 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Handle an incoming request.
|
|
|
|
*
|
2023-01-05 17:01:42 +00:00
|
|
|
* @param Request $request
|
|
|
|
* @param Closure $next
|
2021-08-02 17:25:33 +00:00
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function handle(Request $request, Closure $next)
|
|
|
|
{
|
2022-01-15 17:16:51 +00:00
|
|
|
define('CREDITS_DISPLAY_NAME', config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME', 'Credits'));
|
2021-12-23 08:09:39 +00:00
|
|
|
|
2023-01-05 17:01:42 +00:00
|
|
|
$unsupported_lang_array = explode(',', config('app.unsupported_locales'));
|
2022-01-15 17:16:51 +00:00
|
|
|
$unsupported_lang_array = array_map('strtolower', $unsupported_lang_array);
|
2021-12-23 08:09:39 +00:00
|
|
|
define('UNSUPPORTED_LANGS', $unsupported_lang_array);
|
|
|
|
|
2021-08-02 17:25:33 +00:00
|
|
|
return $next($request);
|
|
|
|
}
|
|
|
|
}
|