File tree Expand file tree Collapse file tree 4 files changed +4
-23
lines changed Expand file tree Collapse file tree 4 files changed +4
-23
lines changed Original file line number Diff line number Diff line change 3535 "autoload" : {
3636 "psr-4" : {
3737 "Hyperlink\\ JsonStructure\\ " : " src" ,
38- "Hyperlink\\ JsonStructure\\ Database\\ Factories\\ " : " database/factories"
3938 }
4039 },
4140 "autoload-dev" : {
6261 "providers" : [
6362 " Hyperlink\\ JsonStructure\\ JsonStructureServiceProvider"
6463 ],
65- "aliases" : {
66- "JsonStructure" : " Hyperlink\\ JsonStructure\\ Facades\\ JsonStructure"
67- }
6864 }
6965 },
7066 "minimum-stability" : " dev" ,
7167 "prefer-stable" : true
72- }
68+ }
Original file line number Diff line number Diff line change 1010class JsonStructureCommand extends Command
1111{
1212 public $ signature = 'json:structure
13- {endpoint? : The api route name to get the json structure from} ' ;
13+ {endpoint? : The api route name to get the json structure from}
14+ {parameter?* : The parameters to pass to the endpoint} ' ;
1415// {array?* : The array to get the json structure from}';
1516
1617 public $ description = 'Converts a json structure to an array with the json keys ' ;
@@ -21,7 +22,7 @@ public function handle(): int
2122
2223// if ($this->argument('endpoint')) {
2324 $ this ->info ('Getting json structure from endpoint... ' );
24- $ response = Http::get (route ($ this ->argument ('endpoint ' )));
25+ $ response = Http::get (route ($ this ->argument ('endpoint ' ), $ this -> argument ( ' parameter ' ) ));
2526
2627 if ($ response ->failed ()) {
2728 $ this ->error ('Could not get json structure from endpoint ' );
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments