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