File tree 4 files changed +6
-25
lines changed
4 files changed +6
-25
lines changed Original file line number Diff line number Diff line change 34
34
},
35
35
"autoload" : {
36
36
"psr-4" : {
37
- "Hyperlink\\ JsonStructure\\ " : " src" ,
38
- "Hyperlink\\ JsonStructure\\ Database\\ Factories\\ " : " database/factories"
37
+ "Hyperlink\\ JsonStructure\\ " : " src"
39
38
}
40
39
},
41
40
"autoload-dev" : {
61
60
"laravel" : {
62
61
"providers" : [
63
62
" Hyperlink\\ JsonStructure\\ JsonStructureServiceProvider"
64
- ],
65
- "aliases" : {
66
- "JsonStructure" : " Hyperlink\\ JsonStructure\\ Facades\\ JsonStructure"
67
- }
63
+ ]
68
64
}
69
65
},
70
66
"minimum-stability" : " dev" ,
71
67
"prefer-stable" : true
72
- }
68
+ }
Original file line number Diff line number Diff line change 10
10
class JsonStructureCommand extends Command
11
11
{
12
12
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} ' ;
14
15
// {array?* : The array to get the json structure from}';
15
16
16
17
public $ description = 'Converts a json structure to an array with the json keys ' ;
@@ -21,7 +22,7 @@ public function handle(): int
21
22
22
23
// if ($this->argument('endpoint')) {
23
24
$ 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 ' ) ));
25
26
26
27
if ($ response ->failed ()) {
27
28
$ 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