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