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

23 lines
449 B
PHP
Raw Normal View History

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