Playback Status Updater (API/UpdatePlaybackStatusController.php)

koel · app/Http/Controllers/API/UpdatePlaybackStatusController.php · php · MIT
ui, voice, realtime, tag:playback

Updates playback status for songs and podcast episodes in a music streaming app

// Source: https://github.com/koel/koel | License: MIT | Copyright 2015 Phan An
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace App\Http\Controllers\API;

use App\Http\Controllers\Controller;
use App\Http\Requests\API\UpdatePlaybackStatusRequest;
use App\Models\User;
use App\Repositories\SongRepository;
use App\Services\Podcast\PodcastService;
use App\Services\QueueService;
use Illuminate\Contracts\Auth\Authenticatable;

class UpdatePlaybackStatusController extends Controller
{
    /** @param User $user */
    public function __invoke(
        UpdatePlaybackStatusRequest $request,
        SongRepository $songRepository,
        QueueService $queueService,
        PodcastService $podcastService,
        Authenticatable $user,
    ) {
        $song = $songRe

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key