mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Correzioni minori e aggiornamento a Laravel 9
This commit is contained in:
29
app/LaravelGettext/Middleware/GettextMiddleware.php
Normal file
29
app/LaravelGettext/Middleware/GettextMiddleware.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\LaravelGettext\Middleware;
|
||||
|
||||
use Closure;
|
||||
use \LaravelGettext;
|
||||
|
||||
class GettextMiddleware
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
/**
|
||||
* The package need to be initialized, the locale will
|
||||
* be available after first method call. If you have
|
||||
* async calls in your project, this filter starts the
|
||||
* locale environment before each request.
|
||||
*/
|
||||
LaravelGettext::getLocale();
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user