mirror of
https://github.com/koel/koel
synced 2025-01-05 09:18:51 +00:00
21 lines
581 B
PHP
21 lines
581 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\Interaction;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\User;
|
|
use App\Repositories\InteractionRepository;
|
|
use Illuminate\Contracts\Auth\Authenticatable;
|
|
|
|
class RecentlyPlayedController extends Controller
|
|
{
|
|
/** @param User $user */
|
|
public function __construct(private InteractionRepository $interactionRepository, private ?Authenticatable $user)
|
|
{
|
|
}
|
|
|
|
public function index(?int $count = null)
|
|
{
|
|
return response()->json($this->interactionRepository->getRecentlyPlayed($this->user, $count));
|
|
}
|
|
}
|