mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
Carbon locale
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
@@ -28,6 +29,7 @@ class Locale
|
||||
$locale = self::$languageMaps[$language->site_lang_folder] ?? 'en';
|
||||
do_log("set locale: " . $locale);
|
||||
App::setLocale($locale);
|
||||
Carbon::setLocale($locale);
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $next($request);
|
||||
|
||||
@@ -29,6 +29,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
// JsonResource::withoutWrapping();
|
||||
DB::connection(config('database.default'))->enableQueryLog();
|
||||
// Nexus::boot();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user