Remove unnecessary function
This commit is contained in:
parent
bbf2f33c5e
commit
fdd90b3be7
37 changed files with 92 additions and 136 deletions
|
@ -43,7 +43,7 @@ class RoleController extends ApplicationApiController
|
|||
->paginate($perPage);
|
||||
|
||||
return $this->fractal->collection($roles)
|
||||
->transformWith($this->getTransformer(AdminRoleTransformer::class))
|
||||
->transformWith(AdminRoleTransformer::class)
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class RoleController extends ApplicationApiController
|
|||
public function view(GetRoleRequest $request, AdminRole $role): array
|
||||
{
|
||||
return $this->fractal->item($role)
|
||||
->transformWith($this->getTransformer(AdminRoleTransformer::class))
|
||||
->transformWith(AdminRoleTransformer::class)
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ class RoleController extends ApplicationApiController
|
|||
$role = AdminRole::query()->create($data);
|
||||
|
||||
return $this->fractal->item($role)
|
||||
->transformWith($this->getTransformer(AdminRoleTransformer::class))
|
||||
->transformWith(AdminRoleTransformer::class)
|
||||
->respond(JsonResponse::HTTP_CREATED);
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ class RoleController extends ApplicationApiController
|
|||
$role->update($request->validated());
|
||||
|
||||
return $this->fractal->item($role)
|
||||
->transformWith($this->getTransformer(AdminRoleTransformer::class))
|
||||
->transformWith(AdminRoleTransformer::class)
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue