Add public API v1 with API key auth, rate limiting, and docs page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
68d01448d2
commit
a583a13da1
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Genre;
|
||||
use App\Models\Platform;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class MetaApiController extends Controller
|
||||
{
|
||||
public function genres(): JsonResponse
|
||||
{
|
||||
return response()->json([
|
||||
'data' => Genre::orderBy('name')->get(['id', 'name', 'slug']),
|
||||
]);
|
||||
}
|
||||
|
||||
public function platforms(): JsonResponse
|
||||
{
|
||||
return response()->json([
|
||||
'data' => Platform::orderBy('name')->get(['id', 'name', 'slug']),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user