Skip to content

Commit

Permalink
configurable impossible-to-match
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanomatteo committed Oct 13, 2022
1 parent 3716a40 commit 8a3093e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#4a1c40",
"titleBar.inactiveBackground": "#250e2099",
"titleBar.inactiveForeground": "#e7e7e799"
"titleBar.inactiveForeground": "#e7e7e799",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#4a1c40",
"statusBarItem.remoteBackground": "#250e20",
"statusBarItem.remoteForeground": "#e7e7e7"
},
"peacock.color": "#250e20"
}
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
* You can place your custom package configuration in here.
*/
return [

'impossible-to-match' => true,
];
4 changes: 3 additions & 1 deletion src/LaravelCodiceFiscale.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public function registerValidator()

} else {
if ($attr) {
$msg .= __('laravel-codice-fiscale::codfisc.impossible-to-match') . ': ' . $cf['err'];
if (config('laravel-codice-fiscale.impossible-to-match')) {
$msg .= __('laravel-codice-fiscale::codfisc.impossible-to-match') . ': ' . $cf['err'];
}
} else {
$msg = $cf['err'];
}
Expand Down
8 changes: 4 additions & 4 deletions src/LaravelCodiceFiscaleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public function boot()
// $this->loadViewsFrom(__DIR__.'/../resources/views', 'laravel-codice-fiscale');
// $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
// $this->loadRoutesFrom(__DIR__.'/routes.php');

$this->mergeConfigFrom(__DIR__ . '/../config/config.php','laravel-codice-fiscale');

\LaravelCodiceFiscale::registerValidator();


if ($this->app->runningInConsole()) {
// $this->publishes([
// __DIR__.'/../config/config.php' => config_path('laravel-codice-fiscale.php'),
// ], 'config');
$this->publishes([
__DIR__ . '/../config/config.php' => config_path('laravel-codice-fiscale.php'),
], 'laravel-codice-fiscale');

// Publishing the views.
/*$this->publishes([
Expand Down

0 comments on commit 8a3093e

Please sign in to comment.