2016-06-04 11:20:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\API\Download;
|
|
|
|
|
|
|
|
use App\Models\Album;
|
|
|
|
use Download;
|
|
|
|
|
|
|
|
class AlbumController extends Controller
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Download all songs in an album.
|
|
|
|
*
|
2016-08-03 10:42:39 +00:00
|
|
|
* @param Album $album
|
2016-06-04 11:20:11 +00:00
|
|
|
*
|
2016-06-04 14:17:24 +00:00
|
|
|
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
2016-08-16 15:12:11 +00:00
|
|
|
* @throws \Exception
|
2016-06-04 11:20:11 +00:00
|
|
|
*/
|
2016-08-03 10:42:11 +00:00
|
|
|
public function download(Album $album)
|
2016-06-04 11:20:11 +00:00
|
|
|
{
|
|
|
|
return response()->download(Download::from($album));
|
|
|
|
}
|
|
|
|
}
|