koel/app/Http/Controllers/API/MediaInformation/ArtistController.php
2022-07-29 09:04:44 +02:00

19 lines
480 B
PHP

<?php
namespace App\Http\Controllers\API\MediaInformation;
use App\Http\Controllers\Controller;
use App\Models\Artist;
use App\Services\MediaInformationService;
class ArtistController extends Controller
{
public function __construct(private MediaInformationService $mediaInformationService)
{
}
public function show(Artist $artist)
{
return response()->json($this->mediaInformationService->getArtistInformation($artist)?->toArray() ?: []);
}
}