Skip to content

Commit

Permalink
Use Lang::get directly instead of helper function.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdnbrk committed Aug 24, 2019
1 parent ac43c47 commit a150709
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/GtinValidationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Mvdnbrk\Gtin;

use Illuminate\Support\Facades\Lang;
use Illuminate\Support\ServiceProvider;

class GtinValidationServiceProvider extends ServiceProvider
Expand Down Expand Up @@ -73,7 +74,7 @@ private function getErrorMessage($rules, $key)
*/
private function getPackageDefaultErrorMessage($rule)
{
return __("gtin::validation.{$rule}");
return Lang::get("gtin::validation.{$rule}");
}

/**
Expand All @@ -84,7 +85,7 @@ private function getPackageDefaultErrorMessage($rule)
*/
private function getValidationErrorMessage($rule)
{
return collect(__("validation.{$rule}"))
return collect(Lang::get("validation.{$rule}"))
->reject("validation.{$rule}")
->first();
}
Expand All @@ -98,7 +99,7 @@ private function getValidationErrorMessage($rule)
*/
private function getCustomErrorMessage($attribute, $rule)
{
return collect(__("validation.custom.{$attribute}.{$rule}"))
return collect(Lang::get("validation.custom.{$attribute}.{$rule}"))
->reject("validation.custom.{$attribute}.{$rule}")
->first();
}
Expand Down

0 comments on commit a150709

Please sign in to comment.