Update to Laravel 5.5 (#814)
This commit is contained in:
parent
f9df463d32
commit
b9d67459b2
35 changed files with 1021 additions and 818 deletions
|
@ -44,9 +44,6 @@ abstract class AdminFormRequest extends FormRequest
|
|||
*/
|
||||
public function normalize($only = [])
|
||||
{
|
||||
return array_merge(
|
||||
$this->only($only),
|
||||
$this->intersect(array_keys($this->rules()))
|
||||
);
|
||||
return $this->all(empty($only) ? array_keys($this->rules()) : $only);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class DatabaseHostFormRequest extends AdminFormRequest
|
|||
*/
|
||||
public function rules()
|
||||
{
|
||||
if (! $this->has('node_id')) {
|
||||
if (! $this->filled('node_id')) {
|
||||
$this->merge(['node_id' => null]);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
<?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;
|
||||
|
||||
|
@ -33,7 +26,7 @@ class UserFormRequest extends AdminFormRequest
|
|||
{
|
||||
if ($this->method === 'PATCH') {
|
||||
return array_merge(
|
||||
$this->intersect('password'),
|
||||
$this->all(['password']),
|
||||
$this->only(['email', 'username', 'name_first', 'name_last', 'root_admin', 'ignore_connection_error'])
|
||||
);
|
||||
}
|
||||
|
|
Reference in a new issue