Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
},
"autoload": {
"psr-4": {
"Hyperlink\\JsonStructure\\": "src",
"Hyperlink\\JsonStructure\\Database\\Factories\\": "database/factories"
"Hyperlink\\JsonStructure\\": "src"
}
},
"autoload-dev": {
Expand All @@ -61,12 +60,9 @@
"laravel": {
"providers": [
"Hyperlink\\JsonStructure\\JsonStructureServiceProvider"
],
"aliases": {
"JsonStructure": "Hyperlink\\JsonStructure\\Facades\\JsonStructure"
}
]
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
5 changes: 3 additions & 2 deletions src/Commands/JsonStructureCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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');
Expand Down
Empty file added src/Facades/.gitkeep
Empty file.
16 changes: 0 additions & 16 deletions src/Facades/JsonStructure.php

This file was deleted.