Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
0 / 0 |
CRAP | |
100.00% |
0 / 0 |
| ProductController | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
| show | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
| <?php | |
| namespace Mtc\Shop\Http\Controllers; | |
| use App\Http\Controllers\Controller; | |
| use Illuminate\Http\Request; | |
| use Mtc\Shop\Product; | |
| class ProductController extends Controller | |
| { | |
| public function show($id) | |
| { | |
| $product = Product::with( | |
| [ | |
| 'media', | |
| 'variants', | |
| 'variants.node' | |
| ] | |
| )->find($id); | |
| return view('shop::public.product')->with(compact('product')); | |
| } | |
| } |