mirror of
https://github.com/koel/koel
synced 2024-12-22 10:33:16 +00:00
26 lines
493 B
PHP
26 lines
493 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\API;
|
|
|
|
use App\Facades\License;
|
|
use App\Models\Song;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
/**
|
|
* @property-read array<string> $songs
|
|
*/
|
|
class ChangeSongsVisibilityRequest extends Request
|
|
{
|
|
/** @return array<mixed> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'songs' => ['required', 'array', Rule::exists(Song::class, 'id')],
|
|
];
|
|
}
|
|
|
|
public function authorize(): bool
|
|
{
|
|
return License::isPlus();
|
|
}
|
|
}
|