Skip to content

Commit 80305fd

Browse files
authored
Merge pull request #60 from decaluwepatrick/master
add binding for ExportLocalizations class in service provider
2 parents 7fdcd2e + 5aac735 commit 80305fd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Classes/ExportLocalizations.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ protected function parseJsonFiles($file, $key, $dir)
338338

339339
public static function exportToArray()
340340
{
341-
return (new self)->export()->toArray();
341+
return \KgBot\LaravelLocalization\Facades\ExportLocalizations::export()->toArray();
342342
}
343343

344344
protected static function executeCallback($strings)

src/LaravelLocalizationServiceProvider.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ class LaravelLocalizationServiceProvider extends ServiceProvider
1717
{
1818
public function boot()
1919
{
20-
$this->app->bind('export-localization', function () {
20+
$this->app->bind(ExportLocalizations::class, function () {
2121
$phpRegex = config('laravel-localization.file_regexp.php', '/^.+\.php$/i');
2222
$jsonRegex = config('laravel-localization.file_regexp.json', '/^.+\.json$/i');
2323

2424
return new ExportLocalizations($phpRegex, $jsonRegex);
2525
});
2626

27+
$this->app->alias(ExportLocalizations::class, 'export-localization');
28+
2729
/*
2830
* Config
2931
*/

0 commit comments

Comments
 (0)