Skip to content

Commit 240b5dd

Browse files
committed
Move land dit to the root
1 parent 5dc8ac8 commit 240b5dd

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed
File renamed without changes.

src/ServiceProvider.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace InteractionDesignFoundation\NovaUnlayerField;
44

5-
use Illuminate\Support\Facades\App;
65
use Illuminate\Support\ServiceProvider as BasicServiceProvider;
76
use Laravel\Nova\Nova;
87

@@ -32,16 +31,14 @@ public function boot(): void
3231

3332
protected function registerTranslations(): void
3433
{
35-
$currentLocale = App::getLocale();
36-
37-
Nova::translations(__DIR__."/../resources/lang/$currentLocale.json");
38-
Nova::translations(resource_path("lang/vendor/nova-unlayer-field/$currentLocale.json"));
34+
Nova::translations(__DIR__.'/../lang/en.json');
35+
Nova::translations($this->app->resourcePath("lang/vendor/nova-unlayer-field/{$this->app->getLocale()}.json"));
3936
}
4037

4138
private function registerResources(): void
4239
{
4340
$this->publishes([
44-
__DIR__.'/../config/unlayer.php' => config_path('unlayer.php'),
41+
__DIR__.'/../config/unlayer.php' => $this->app->configPath('unlayer.php'),
4542
], 'config');
4643
}
4744
}

0 commit comments

Comments
 (0)