loadTranslationsFrom(__DIR__.'/lang', 'laravelprofane'); $this->publishes([ __DIR__.'/lang' => resource_path('lang/vendor/laravel-profane'), ]); Validator::extend('profane', 'LaravelProfane\ProfaneValidator@validate'); Validator::replacer('profane', function($message, $attribute, $rule, $parameters) { return str_replace(':attribute', $attribute, $message); }); } public function register() { // code... } }