Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
PromptLanguageController | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
index | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Http\Controllers\v2; |
4 | |
5 | use App\Enums\HttpStatusCode; |
6 | use App\Http\Controllers\Controller; |
7 | use App\Http\Models\PromptLanguage; |
8 | use Illuminate\Http\JsonResponse; |
9 | |
10 | class PromptLanguageController extends Controller |
11 | { |
12 | public function index(): JsonResponse |
13 | { |
14 | $data = PromptLanguage::all(); |
15 | |
16 | return response()->json( |
17 | data: [ |
18 | 'data' => $data |
19 | ], |
20 | status: HttpStatusCode::OK->value |
21 | ); |
22 | } |
23 | } |