Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 4 |
BenefitsController | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 4 |
__construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
index | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
1 | <?php |
2 | |
3 | namespace Qmp\Laravel\Compta\Controllers; |
4 | |
5 | use Illuminate\Http\Request; |
6 | use Qmp\Laravel\MicroService\Controllers\AbstractMicroServiceController; |
7 | |
8 | class BenefitsController extends AbstractMicroServiceController |
9 | { |
10 | |
11 | /** |
12 | * BenefitsController constructor. |
13 | * @param Request $request |
14 | */ |
15 | public function __construct(Request $request) |
16 | { |
17 | parent::__construct($request); |
18 | } |
19 | |
20 | /** |
21 | * Display a listing of the resource. |
22 | * |
23 | * @return \Illuminate\Http\Response |
24 | */ |
25 | public function index() |
26 | { |
27 | $benefits = [ |
28 | [ |
29 | 'id' => 1, |
30 | 'name' => 'Prestation1' |
31 | ], |
32 | [ |
33 | 'id' => 2, |
34 | 'name' => 'Prestation2' |
35 | ], |
36 | [ |
37 | 'id' => 3, |
38 | 'name' => 'Prestation5' |
39 | ], |
40 | [ |
41 | 'id' => 4, |
42 | 'name' => 'Prestation4' |
43 | ], |
44 | [ |
45 | 'id' => 5, |
46 | 'name' => 'Prestation5' |
47 | ] |
48 | ]; |
49 | |
50 | return response()->json($benefits); |
51 | } |
52 | } |