mirror of
https://github.com/koel/koel
synced 2024-12-23 19:13:06 +00:00
23 lines
430 B
PHP
23 lines
430 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Requests\API;
|
||
|
|
||
|
use App\Models\Song;
|
||
|
use Illuminate\Validation\Rule;
|
||
|
|
||
|
/**
|
||
|
* @property-read string $song
|
||
|
* @property-read int $position
|
||
|
*/
|
||
|
class UpdatePlaybackStatusRequest extends Request
|
||
|
{
|
||
|
/** @return array<mixed> */
|
||
|
public function rules(): array
|
||
|
{
|
||
|
return [
|
||
|
'song' => [Rule::exists(Song::class, 'id')],
|
||
|
'position' => 'required|integer',
|
||
|
];
|
||
|
}
|
||
|
}
|