mirror of
https://github.com/koel/koel
synced 2024-12-25 12:03:06 +00:00
21 lines
463 B
PHP
21 lines
463 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('owner', $playlist);
|
|
|
|
return response()->download($this->downloadService->from($playlist));
|
|
}
|
|
}
|