Files
ghostpizza/app/Http/Controllers/Api/LinkController.php
2025-10-11 17:02:49 +02:00

22 lines
421 B
PHP

<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use App\Models\Link;
class LinkController extends Controller
{
public function index(): JsonResponse
{
$link = Link::first();
$links = $link ? $link->links : [];
return response()->json([
'status' => 'success',
'data' => $links
]);
}
}