Level 75
Mar 20, 2024
2
Level 3
Missing Providers
How could I do this in laravel 11? there's no providers in app.php!
You can install the package via composer:
composer require spatie/laravel-translation-loader
In config/app.php (Laravel) or bootstrap/app.php (Lumen) you should replace Laravel's translation service provider
Illuminate\Translation\TranslationServiceProvider::class,
by the one included in this package:
Spatie\TranslationLoader\TranslationServiceProvider::class,
Level 9
config/app.php providers is sitll works. Add by yourself.
// config/app.php
use Illuminate\Support\ServiceProvider;
'providers' => ServiceProvider::defaultProviders()->replace([
Illuminate\Translation\TranslationServiceProvider::class => Spatie\TranslationLoader\TranslationServiceProvider::class,
])->toArray(),
1 like
Please or to participate in this conversation.