mirror of
https://github.com/koel/koel
synced 2024-12-19 17:13:09 +00:00
21 lines
390 B
PHP
21 lines
390 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\API;
|
|
|
|
use App\Models\Song;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
/**
|
|
* @property array<string> $songs
|
|
*/
|
|
class PlaylistSyncRequest extends Request
|
|
{
|
|
/** @return array<mixed> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'songs' => 'present|array',
|
|
'songs.*' => [Rule::exists(Song::class, 'id')],
|
|
];
|
|
}
|
|
}
|