1 | <?php |
||
8 | class JsValidationServiceProvider extends ServiceProvider |
||
9 | { |
||
10 | /** |
||
11 | * Bootstrap the application services. |
||
12 | */ |
||
13 | 4 | public function boot() |
|
24 | |||
25 | /** |
||
26 | * Register the application services. |
||
27 | */ |
||
28 | 1 | public function register() |
|
36 | |||
37 | /** |
||
38 | * Configure and publish views. |
||
39 | */ |
||
40 | 4 | protected function bootstrapViews() |
|
49 | |||
50 | /** |
||
51 | * Configure Laravel Validator. |
||
52 | */ |
||
53 | protected function bootstrapValidator() |
||
54 | { |
||
55 | 4 | $callback = function () { |
|
56 | return true; |
||
57 | 4 | }; |
|
58 | 4 | $this->app['validator']->extend(ValidatorHandler::JSVALIDATION_DISABLE, $callback); |
|
59 | 4 | } |
|
60 | |||
61 | /** |
||
62 | * Load and publishes configs. |
||
63 | */ |
||
64 | 4 | protected function bootstrapConfigs() |
|
71 | |||
72 | /** |
||
73 | * Publish public assets. |
||
74 | */ |
||
75 | 4 | protected function publishAssets() |
|
81 | } |
||
82 |