misc_pterodactyl-panel/app/Http/Requests/Admin/MountFormRequest.php
Matthew Penner cbcf62086f
Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00

20 lines
432 B
PHP

<?php
namespace Pterodactyl\Http\Requests\Admin;
use Pterodactyl\Models\Mount;
class MountFormRequest extends AdminFormRequest
{
/**
* Set up the validation rules to use for these requests.
*/
public function rules(): array
{
if ($this->method() === 'PATCH') {
return Mount::getRulesForUpdate($this->route()->parameter('mount')->id);
}
return Mount::getRules();
}
}