Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| PromptFlyRewriteController | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| index | |
0.00% |
0 / 9 |
|
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\FlyGrammarLanguage; |
| 8 | use Illuminate\Http\JsonResponse; |
| 9 | |
| 10 | class 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 | } |