mirror of
https://github.com/koel/koel
synced 2024-12-25 20:13:06 +00:00
21 lines
461 B
PHP
21 lines
461 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Download;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Playlist;
|
|
use App\Services\DownloadService;
|
|
|
|
class PlaylistController extends Controller
|
|
{
|
|
public function __construct(private DownloadService $downloadService)
|
|
{
|
|
}
|
|
|
|
public function show(Playlist $playlist)
|
|
{
|
|
$this->authorize('own', $playlist);
|
|
|
|
return response()->download($this->downloadService->from($playlist));
|
|
}
|
|
}
|