2016-06-04 11:20:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\API\Download;
|
|
|
|
|
|
|
|
use App\Models\Album;
|
2017-06-04 01:30:45 +00:00
|
|
|
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
2016-06-04 11:20:11 +00:00
|
|
|
|
|
|
|
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
|
|
|
*
|
2017-06-04 01:30:45 +00:00
|
|
|
* @return BinaryFileResponse
|
2016-06-04 11:20:11 +00:00
|
|
|
*/
|
2018-08-18 11:51:52 +00:00
|
|
|
public function show(Album $album)
|
2016-06-04 11:20:11 +00:00
|
|
|
{
|
2018-08-18 11:51:52 +00:00
|
|
|
return response()->download($this->downloadService->from($album));
|
2016-06-04 11:20:11 +00:00
|
|
|
}
|
|
|
|
}
|