2016-06-04 11:20:11 +00:00
|
|
|
<?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.
|
|
|
|
*
|
2016-08-03 10:42:39 +00:00
|
|
|
* @param Artist $artist
|
2016-06-04 11:20:11 +00:00
|
|
|
*
|
2016-08-16 15:12:11 +00:00
|
|
|
* @throws \Exception
|
2016-08-16 15:12:35 +00:00
|
|
|
*
|
|
|
|
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
2016-06-04 11:20:11 +00:00
|
|
|
*/
|
2016-08-03 10:42:11 +00:00
|
|
|
public function download(Artist $artist)
|
2016-06-04 11:20:11 +00:00
|
|
|
{
|
|
|
|
return response()->download(Download::from($artist));
|
|
|
|
}
|
|
|
|
}
|