finished laravel migration

This commit is contained in:
2025-12-29 18:19:24 +01:00
parent bdfbe3ffd6
commit 63bd166a65
218 changed files with 21830 additions and 15154 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\File;
class I18nController extends Controller
{
public function __invoke(string $locale): JsonResponse
{
$path = resource_path("lang/{$locale}.json");
if (!File::exists($path)) {
return response()->json([], 404);
}
$contents = File::get($path);
return response()->json(json_decode($contents, true, 512, JSON_THROW_ON_ERROR));
}
}