Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
16 | 48 | public function boot() |
|
17 | { |
||
18 | 48 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
19 | |||
20 | 48 | if ($this->app->runningInConsole()) { |
|
21 | 48 | $this->publishes([ |
|
22 | 48 | __DIR__.'/../config/config.php' => config_path('ab-testing.php'), |
|
23 | 48 | ], 'config'); |
|
24 | |||
25 | 48 | $this->commands([ |
|
26 | 48 | ReportCommand::class, |
|
27 | ResetCommand::class, |
||
28 | ]); |
||
29 | } |
||
30 | |||
31 | Request::macro('abExperiment', function () { |
||
32 | 3 | return app(AbTesting::class)->getExperiment(); |
|
33 | 48 | }); |
|
34 | |||
35 | Blade::if('ab', function ($experiment) { |
||
36 | 3 | return app(AbTesting::class)->isExperiment($experiment); |
|
37 | 48 | }); |
|
38 | 48 | } |
|
39 | |||
54 |