This repository has been archived on 2025-05-09. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Astral-nook/app/Http/Requests/Admin/DatabaseHostFormRequest.php
2017-09-25 21:43:01 -05:00

27 lines
622 B
PHP

<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Http\Requests\Admin;
use Pterodactyl\Models\DatabaseHost;
class DatabaseHostFormRequest extends AdminFormRequest
{
/**
* @return mixed
*/
public function rules()
{
if ($this->method() !== 'POST') {
return DatabaseHost::getUpdateRulesForId($this->route()->parameter('host')->id);
}
return DatabaseHost::getCreateRules();
}
}