diff --git a/composer.json b/composer.json index ef157ac..1e1877a 100644 --- a/composer.json +++ b/composer.json @@ -34,8 +34,7 @@ }, "autoload": { "psr-4": { - "Hyperlink\\JsonStructure\\": "src", - "Hyperlink\\JsonStructure\\Database\\Factories\\": "database/factories" + "Hyperlink\\JsonStructure\\": "src" } }, "autoload-dev": { @@ -61,12 +60,9 @@ "laravel": { "providers": [ "Hyperlink\\JsonStructure\\JsonStructureServiceProvider" - ], - "aliases": { - "JsonStructure": "Hyperlink\\JsonStructure\\Facades\\JsonStructure" - } + ] } }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/src/Commands/JsonStructureCommand.php b/src/Commands/JsonStructureCommand.php index 3739cc7..1870e6b 100644 --- a/src/Commands/JsonStructureCommand.php +++ b/src/Commands/JsonStructureCommand.php @@ -10,7 +10,8 @@ class JsonStructureCommand extends Command { public $signature = 'json:structure - {endpoint? : The api route name to get the json structure from}'; + {endpoint? : The api route name to get the json structure from} + {parameter?* : The parameters to pass to the endpoint}'; // {array?* : The array to get the json structure from}'; public $description = 'Converts a json structure to an array with the json keys'; @@ -21,7 +22,7 @@ public function handle(): int // if ($this->argument('endpoint')) { $this->info('Getting json structure from endpoint...'); - $response = Http::get(route($this->argument('endpoint'))); + $response = Http::get(route($this->argument('endpoint'), $this->argument('parameter'))); if ($response->failed()) { $this->error('Could not get json structure from endpoint'); diff --git a/src/Facades/.gitkeep b/src/Facades/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/Facades/JsonStructure.php b/src/Facades/JsonStructure.php deleted file mode 100644 index 9e825e0..0000000 --- a/src/Facades/JsonStructure.php +++ /dev/null @@ -1,16 +0,0 @@ -