AccountController
extends Controller
in package
Table of Contents
- $accountService : AccountService
- $creditCardService : CreditCardService
- $serviceService : ServiceService
- $userService : UserService
- __construct() : mixed
- getCreditCards() : CreditCardResourceCollection|Response
- Fetch all credit cards owned by the Account
- getServices() : ServiceResourceCollection|JsonResponse
- Fetch all Services of the Account
- getUsers() : UserResourceCollection|JsonResponse
- Fetch all users can access the specified account
- index() : AccountResourceCollection|JsonResponse
- show() : AccountResource
- Display the specified resource.
Properties
$accountService
protected
AccountService
$accountService
$creditCardService
protected
CreditCardService
$creditCardService
$serviceService
protected
ServiceService
$serviceService
$userService
protected
UserService
$userService
Methods
__construct()
public
__construct(AccountService $accountService, UserService $userService, ServiceService $serviceService, CreditCardService $creditCardService) : mixed
Parameters
- $accountService : AccountService
- $userService : UserService
- $serviceService : ServiceService
- $creditCardService : CreditCardService
Return values
mixed —getCreditCards()
Fetch all credit cards owned by the Account
public
getCreditCards(int|string $id) : CreditCardResourceCollection|Response
Parameters
- $id : int|string
-
the id of the account
Return values
CreditCardResourceCollection|Response —getServices()
Fetch all Services of the Account
public
getServices(int|string $id) : ServiceResourceCollection|JsonResponse
Parameters
- $id : int|string
-
the id of the account
Return values
ServiceResourceCollection|JsonResponse —the services
getUsers()
Fetch all users can access the specified account
public
getUsers(int|string $id) : UserResourceCollection|JsonResponse
Parameters
- $id : int|string
-
the id of the account
Return values
UserResourceCollection|JsonResponse —the users
index()
public
index(Request $request) : AccountResourceCollection|JsonResponse
Parameters
- $request : Request
Return values
AccountResourceCollection|JsonResponse —the accounts (paginated)
show()
Display the specified resource.
public
show(int|string $idOrEmail) : AccountResource
Parameters
- $idOrEmail : int|string
-
the field to search for
Tags
Return values
AccountResource —the account resource