26 lines
580 B
PHP
26 lines
580 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Closure;
|
|
use Illuminate\Http\Request;
|
|
|
|
class GlobalNames
|
|
{
|
|
/**
|
|
* Handle an incoming request.
|
|
*
|
|
* @param Request $request
|
|
* @param Closure $next
|
|
* @return mixed
|
|
*/
|
|
public function handle(Request $request, Closure $next)
|
|
{
|
|
$unsupported_lang_array = explode(',', config('app.unsupported_locales'));
|
|
$unsupported_lang_array = array_map('strtolower', $unsupported_lang_array);
|
|
define('UNSUPPORTED_LANGS', $unsupported_lang_array);
|
|
|
|
return $next($request);
|
|
}
|
|
}
|