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

19 lines
385 B
PHP
Raw Normal View History

<?php
2023-06-05 21:46:41 +00:00
namespace App\Http\Requests\API;
2024-01-10 20:04:37 +00:00
use App\Models\Song;
use Illuminate\Validation\Rule;
/** @property-read array<string> $songs */
class DeleteSongsRequest extends Request
{
/** @inheritdoc */
public function rules(): array
{
return [
'songs' => ['required', 'array', Rule::exists(Song::class, 'id')->whereNull('podcast_id')],
];
}
}