koel/app/Http/Requests/API/UpdatePlaybackStatusRequest.php
2024-07-06 17:45:04 +02:00

22 lines
449 B
PHP

<?php
namespace App\Http\Requests\API;
use App\Models\Song;
use Illuminate\Validation\Rules\Exists;
/**
* @property-read string $song
* @property-read int $position
*/
class UpdatePlaybackStatusRequest extends Request
{
/** @inheritdoc */
public function rules(): array
{
return [
'song' => ['required', 'string', new Exists(Song::class, 'id')],
'position' => 'required|integer',
];
}
}