koel/app/Http/Requests/API/AddSongsToPlaylistRequest.php
2024-07-06 17:44:41 +02:00

20 lines
380 B
PHP

<?php
namespace App\Http\Requests\API;
use App\Models\Song;
use Illuminate\Validation\Rule;
/**
* @property-read array<string> $songs
*/
class AddSongsToPlaylistRequest extends Request
{
/** @return array<mixed> */
public function rules(): array
{
return [
'songs' => ['required', 'array', Rule::exists(Song::class, 'id')],
];
}
}