feat: New design and optimization

This commit is contained in:
2025-10-27 13:23:05 +05:45
parent 63777cb3c1
commit db9315ad22
44 changed files with 2877 additions and 336 deletions

View File

@@ -2,7 +2,10 @@
namespace App\Providers;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\ServiceProvider;
use Inertia\Inertia;
class AppServiceProvider extends ServiceProvider
{
@@ -19,6 +22,18 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
//
Inertia::share([
'locale' => function () {
$locale = Session::get('locale', config('app.locale'));
App::setLocale($locale);
return $locale;
},
'translations' => function () {
$locale = Session::get('locale', config('app.locale'));
App::setLocale($locale);
return trans('messages');
},
]);
// App::setLocale(Session::get('locale', config('app.locale')));
}
}