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);