diff --git a/src/Classes/ExportLocalizations.php b/src/Classes/ExportLocalizations.php index 7be7a3f..b488ac9 100644 --- a/src/Classes/ExportLocalizations.php +++ b/src/Classes/ExportLocalizations.php @@ -44,7 +44,7 @@ class ExportLocalizations implements \JsonSerializable * @param string $phpRegex * @param string $jsonRegex */ - public function __construct($phpRegex, $jsonRegex) + public function __construct($phpRegex = '/^.+\.php$/i', $jsonRegex = '/^.+\.json$/i') { $this->phpRegex = $phpRegex; $this->jsonRegex = $jsonRegex; diff --git a/src/LaravelLocalizationServiceProvider.php b/src/LaravelLocalizationServiceProvider.php index 2cd26a3..10bd699 100644 --- a/src/LaravelLocalizationServiceProvider.php +++ b/src/LaravelLocalizationServiceProvider.php @@ -18,8 +18,8 @@ class LaravelLocalizationServiceProvider extends ServiceProvider public function boot() { $this->app->bind('export-localization', function () { - $phpRegex = config('laravel-localization.file_regexp.php'); - $jsonRegex = config('laravel-localization.file_regexp.json'); + $phpRegex = config('laravel-localization.file_regexp.php', '/^.+\.php$/i'); + $jsonRegex = config('laravel-localization.file_regexp.json', '/^.+\.json$/i'); return new ExportLocalizations($phpRegex, $jsonRegex); });