koel/app/Http/Controllers/API/Download/ArtistController.php

24 lines
557 B
PHP
Raw Normal View History

<?php
namespace App\Http\Controllers\API\Download;
use App\Models\Artist;
2017-06-04 01:30:45 +00:00
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class ArtistController extends Controller
{
/**
* Download all songs by an artist.
* Don't see why one would need this, really.
* Let's pray to God the user doesn't trigger this on Elvis.
*
2016-08-03 10:42:39 +00:00
* @param Artist $artist
*
2017-06-04 01:30:45 +00:00
* @return BinaryFileResponse
*/
2018-08-18 11:51:52 +00:00
public function show(Artist $artist)
{
2018-08-18 11:51:52 +00:00
return response()->download($this->downloadService->from($artist));
}
}