koel/app/Http/Controllers/API/Download/ArtistController.php
2016-08-16 23:12:35 +08:00

25 lines
571 B
PHP

<?php
namespace App\Http\Controllers\API\Download;
use App\Models\Artist;
use Download;
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.
*
* @param Artist $artist
*
* @throws \Exception
*
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
*/
public function download(Artist $artist)
{
return response()->download(Download::from($artist));
}
}