Skip to content

Commit

Permalink
update resource
Browse files Browse the repository at this point in the history
  • Loading branch information
adityadarma committed May 5, 2024
1 parent 69f6374 commit d9cc091
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Services/BaseService.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,21 @@ public function toJson(): JsonResponse
/**
* Convert resource to json response
*
* @param $resource
* @return static
* @param string $resource
* @return JsonResponse
*/
public function toJsonFromResource($resource)
public function toJsonFromResource(string $resource): JsonResponse
{
return $this->resource($resource)->toJson();
}

/**
* Convert to json data with resource
*
* @param $resource
* @param string $resource
* @return static
*/
public function resource($resource): static
public function resource(string $resource): static
{
if ($this->data) {
// Simple Paginate
Expand Down

0 comments on commit d9cc091

Please sign in to comment.