From f8804fc651635c5d475c864ce9eb56ac2828d725 Mon Sep 17 00:00:00 2001 From: Maxime Renou Date: Sun, 1 Dec 2024 16:03:43 +0100 Subject: [PATCH] fix keys --- src/Laravel/PilotServiceProvider.php | 2 +- src/Pilot.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Laravel/PilotServiceProvider.php b/src/Laravel/PilotServiceProvider.php index aaa77fb..b51b6e4 100644 --- a/src/Laravel/PilotServiceProvider.php +++ b/src/Laravel/PilotServiceProvider.php @@ -85,7 +85,7 @@ class PilotServiceProvider extends ServiceProvider abort(403); } - $output = $this->pilot->handle($request->all(), $request->files->all()); + $output = $this->pilot->handle($request->all(), $request->allFiles()); if (isset($output['json'])) { return response()->json($output['json']); diff --git a/src/Pilot.php b/src/Pilot.php index 03de526..56f3350 100644 --- a/src/Pilot.php +++ b/src/Pilot.php @@ -53,8 +53,8 @@ class Pilot public function handle($data = [], $files = []) { - $type = $data['type'] ?? null; - $slug = $data['slug'] ?? null; + $type = $data['_type'] ?? null; + $slug = $data['_slug'] ?? null; if (isset($this->registry[$type]) && isset($this->registry[$type][$slug])) { $params = $this->resolveDependencies($slug, $this->registry[$type][$slug], $data, $files);