i donno what to do now

This commit is contained in:
Arandi Lopez 2016-07-18 23:06:48 -05:00
parent 69faeea96e
commit 9f11776e14
1 changed files with 3 additions and 2 deletions

View File

@ -3,18 +3,19 @@
namespace LaravelProfane;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Lang;
class ProfaneServiceProvider extends ServiceProvider
{
public function boot()
{
$this->loadTranslationsFrom(__DIR__.'/lang', 'laravel-profane');
$this->loadTranslationsFrom(__DIR__.'/lang', 'laravelprofane');
$this->publishes([
__DIR__.'/lang' => resource_path('lang/vendor/laravel-profane'),
]);
Validator::extend('profane', 'LaravelProfane\ProfaneValidator@validate');
Validator::extend('profane', 'LaravelProfane\ProfaneValidator@validate', Lang::get('laravelprofane::validation.profane'));
Validator::replacer('profane', function($message, $attribute, $rule, $parameters) {
return str_replace(':attribute', $attribute, $message);