koel/app/Http/Controllers/API/Podcast/FetchEpisodeController.php

18 lines
369 B
PHP
Raw Normal View History

2024-05-19 05:49:42 +00:00
<?php
namespace App\Http\Controllers\API\Podcast;
use App\Http\Controllers\Controller;
use App\Http\Resources\SongResource;
use App\Models\Song as Episode;
class FetchEpisodeController extends Controller
{
public function __invoke(Episode $episode)
{
$this->authorize('view', $episode->podcast);
return SongResource::make($episode);
}
}