mirror of
https://github.com/pterodactyl/panel.git
synced 2026-02-05 12:22:23 -06:00
21 lines
470 B
PHP
21 lines
470 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); // @phpstan-ignore property.nonObject
|
|
}
|
|
|
|
return Mount::getRules();
|
|
}
|
|
}
|