Conditions | 3 |
Paths | 2 |
Total Lines | 26 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function boot() |
||
19 | { |
||
20 | if ($this->app->runningInConsole()) { |
||
21 | $this->publishes([ |
||
22 | __DIR__.'/../config/valid.php' => config_path('valid.php'), |
||
23 | ]); |
||
24 | } |
||
25 | |||
26 | $this->mergeConfigFrom(__DIR__.'/../config/valid.php', 'valid'); |
||
27 | |||
28 | $this->app->resolving(ValidatesWhenResolved::class, function ($resolved) { |
||
29 | if (method_exists($resolved, 'prepareCustomRules')) { |
||
30 | $resolved->prepareCustomRules(); |
||
31 | } |
||
32 | }); |
||
33 | |||
34 | $this->app->resolving(ValidationService::class, function ($resolved, $app) { |
||
35 | $resolved->setContainer($app)->setRedirector($app->make(Redirector::class)); |
||
36 | }); |
||
37 | |||
38 | $this->commands([ |
||
39 | FormRequestMakeCommand::class, |
||
40 | CustomRuleMakeCommand::class, |
||
41 | ValidationServiceMakeCommand::class, |
||
42 | ]); |
||
43 | } |
||
44 | } |
||
45 |