koel/app/Http/Requests/API/UpdateQueueStateRequest.php

21 lines
391 B
PHP

<?php
namespace App\Http\Requests\API;
use App\Models\Song;
use Illuminate\Validation\Rule;
/**
* @property-read array<string> $songs
*/
class UpdateQueueStateRequest extends Request
{
/** @return array<mixed> */
public function rules(): array
{
return [
'songs' => 'array',
'songs.*' => [Rule::exists(Song::class, 'id')],
];
}
}