mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
Removes duplication of cache clearing (#2738)
This commit is contained in:
parent
54155dbe1e
commit
cedee652db
|
@ -10,25 +10,13 @@
|
||||||
namespace Flarum\Locale;
|
namespace Flarum\Locale;
|
||||||
|
|
||||||
use Flarum\Foundation\AbstractServiceProvider;
|
use Flarum\Foundation\AbstractServiceProvider;
|
||||||
use Flarum\Foundation\Event\ClearingCache;
|
|
||||||
use Flarum\Foundation\Paths;
|
use Flarum\Foundation\Paths;
|
||||||
use Flarum\Settings\SettingsRepositoryInterface;
|
use Flarum\Settings\SettingsRepositoryInterface;
|
||||||
use Illuminate\Contracts\Events\Dispatcher;
|
|
||||||
use Illuminate\Contracts\Translation\Translator as TranslatorContract;
|
use Illuminate\Contracts\Translation\Translator as TranslatorContract;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
class LocaleServiceProvider extends AbstractServiceProvider
|
class LocaleServiceProvider extends AbstractServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function boot(Dispatcher $events)
|
|
||||||
{
|
|
||||||
$events->listen(ClearingCache::class, function () {
|
|
||||||
$this->container->make('flarum.locales')->clearCache();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user