Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php namespace App\Providers;
- use App\Services\MyValidator;
- use Illuminate\Support\Facades\Validator;
- use Illuminate\Support\ServiceProvider;
- class MyServiceProvider extends ServiceProvider {
- /**
- * Bootstrap the application services.
- *
- * @return void
- */
- public function boot()
- {
- Validator::resolver(function($translator, $data, $rules, $messages)
- {
- return new MyValidator($translator, $data, $rules, $messages);
- });
- }
- /**
- * Register the application services.
- *
- * @return void
- */
- public function register()
- {
- //
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement