mirror of
https://github.com/koel/koel
synced 2024-12-24 19:43:06 +00:00
21 lines
464 B
PHP
21 lines
464 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\V6\API;
|
||
|
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use App\Http\Resources\AlbumResource;
|
||
|
use App\Models\Artist;
|
||
|
use App\Repositories\AlbumRepository;
|
||
|
|
||
|
class ArtistAlbumController extends Controller
|
||
|
{
|
||
|
public function __construct(private AlbumRepository $albumRepository)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public function index(Artist $artist)
|
||
|
{
|
||
|
return AlbumResource::collection($this->albumRepository->getByArtist($artist));
|
||
|
}
|
||
|
}
|