Laravel 10 (#4706)
This commit is contained in:
parent
ad4ddc6300
commit
1d38b4f0e2
136 changed files with 1735 additions and 2008 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Pterodactyl\Traits\Controllers;
|
||||
|
||||
use JavaScript;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
trait JavascriptInjection
|
||||
|
@ -24,6 +23,6 @@ trait JavascriptInjection
|
|||
*/
|
||||
public function plainInject(array $args = []): string
|
||||
{
|
||||
return JavaScript::put($args);
|
||||
return \JavaScript::put($args);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,6 @@ trait PlainJavascriptInjection
|
|||
*/
|
||||
public function injectJavascript($data)
|
||||
{
|
||||
JavaScript::put($data);
|
||||
\JavaScript::put($data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Pterodactyl\Traits\Services;
|
||||
|
||||
use BadMethodCallException;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
|
||||
use Pterodactyl\Exceptions\Service\Egg\Variable\BadValidationRuleException;
|
||||
|
@ -21,7 +20,7 @@ trait ValidatesValidationRules
|
|||
{
|
||||
try {
|
||||
$this->getValidator()->make(['__TEST' => 'test'], ['__TEST' => $rules])->fails();
|
||||
} catch (BadMethodCallException $exception) {
|
||||
} catch (\BadMethodCallException $exception) {
|
||||
$matches = [];
|
||||
if (preg_match('/Method \[(.+)\] does not exist\./', $exception->getMessage(), $matches)) {
|
||||
throw new BadValidationRuleException(trans('exceptions.nest.variables.bad_validation_rule', ['rule' => Str::snake(str_replace('validate', '', array_get($matches, 1, 'unknownRule')))]), $exception);
|
||||
|
|
Reference in a new issue