Skip to content

Commit

Permalink
fix: request function call
Browse files Browse the repository at this point in the history
  • Loading branch information
joy2362 committed Jun 13, 2023
1 parent 73935d4 commit 7c8e2e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Command/CSGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public function getControllerStubVariables(): array
'REQUEST-NAMESPACE' => $this->option('api') ? 'use' . $this->RequestNameSpace . "\\" . $this->argument(
'name'
) . "Request" : '',
'REQUEST' => $this->option('api') ? $this->argument(
'name'
) . "Request" : 'Request',

];
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stubs/Controller.api.stub
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class $CLASS$ extends Controller
return ApiHelper::response($this->service->index($request));
}

public function store(CouponRequest $request): JsonResponse
public function store($REQUEST$ $request): JsonResponse
{
return ApiHelper::response($this->service->store($request));
}
Expand All @@ -28,7 +28,7 @@ class $CLASS$ extends Controller
return ApiHelper::response($this->service->show($id));
}

public function update(CouponRequest $request, $id): JsonResponse
public function update($REQUEST$ $request, $id): JsonResponse
{
return ApiHelper::response($this->service->update($request, $id));
}
Expand Down

0 comments on commit 7c8e2e6

Please sign in to comment.