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

25 lines
412 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests\API;
2024-01-09 18:34:40 +00:00
use App\Facades\License;
/**
* @property-read array<string> $songs
*/
class ChangeSongsVisibilityRequest extends Request
{
/** @return array<mixed> */
public function rules(): array
{
return [
'songs' => 'required|exists:songs,id',
];
}
2024-01-09 18:34:40 +00:00
public function authorize(): bool
{
return License::isPlus();
}
}