mirror of
https://github.com/koel/koel
synced 2024-12-19 17:13:09 +00:00
22 lines
449 B
PHP
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',
|
|
];
|
|
}
|
|
}
|