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