mirror of
https://github.com/koel/koel
synced 2024-12-14 06:32:28 +00:00
17 lines
504 B
PHP
17 lines
504 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\Interaction;
|
|
|
|
use App\Events\SongStartedPlaying;
|
|
use App\Http\Requests\API\Interaction\StorePlayCountRequest;
|
|
|
|
class PlayCountController extends Controller
|
|
{
|
|
public function store(StorePlayCountRequest $request)
|
|
{
|
|
$interaction = $this->interactionService->increasePlayCount($request->song, $this->currentUser);
|
|
event(new SongStartedPlaying($interaction->song, $interaction->user));
|
|
|
|
return response()->json($interaction);
|
|
}
|
|
}
|