mirror of
https://github.com/koel/koel
synced 2024-12-01 08:19:18 +00:00
25 lines
535 B
PHP
25 lines
535 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Http\Resources\ArtistResource;
|
|
use App\Models\Artist;
|
|
use App\Repositories\ArtistRepository;
|
|
|
|
class ArtistController extends Controller
|
|
{
|
|
public function __construct(private readonly ArtistRepository $repository)
|
|
{
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
return ArtistResource::collection($this->repository->paginate());
|
|
}
|
|
|
|
public function show(Artist $artist)
|
|
{
|
|
return ArtistResource::make($artist);
|
|
}
|
|
}
|