2022-07-04 10:39:02 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\V6\Requests;
|
|
|
|
|
|
|
|
use App\Http\Requests\API\Request;
|
2022-08-10 14:56:01 +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 AddSongsToPlaylistRequest extends Request
|
|
|
|
{
|
|
|
|
/** @return array<mixed> */
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'songs' => 'required|array',
|
2022-08-10 14:56:01 +00:00
|
|
|
'songs.*' => [Rule::exists(Song::class, 'id')],
|
2022-07-04 10:39:02 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|