Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 5 |
| ProductComposer | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
20 | |
0.00% |
0 / 5 |
| compose | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 3 |
|||
| anonymous function | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace Mtc\Shop\Http\ViewComposers; | |
| use Illuminate\View\View; | |
| class ProductComposer | |
| { | |
| public function compose(View $view) | |
| { | |
| $view->with([ | |
| 'price_methods' => collect(event('core.shop.price_methods')) | |
| ->flatten() // Allows users to pass arrays if they want | |
| ->reject(function($method) { | |
| return empty($method) || ! class_exists($method); | |
| }), | |
| ]); | |
| } | |
| } | |