1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-02-24 19:22:35 +01:00
LinkAce/app/Http/Controllers/API/ListLinksController.php
2020-11-17 19:01:37 +01:00

24 lines
490 B
PHP

<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Models\LinkList;
use Illuminate\Http\JsonResponse;
class ListLinksController extends Controller
{
/**
* Get the links for a specific list.
*
* @param LinkList $list
* @return JsonResponse
*/
public function __invoke(LinkList $list): JsonResponse
{
$links = $list->links()->paginate(getPaginationLimit());
return response()->json($links);
}
}