CharacterController
extends Controller
in package
Table of Contents
Methods
- __construct() : mixed
- Class constructor
- create() : Response
- Show the form for creating a new character resource.
- destroy() : RedirectResponse|JsonResponse
- Remove the specified character from storage.
- index() : Response
- Display a listing of the user's character resources.
- show() : Response
- Display the specified character resource.
- store() : Response|RedirectResponse
- Store a user's newly created character resource in storage.
- update() : RedirectResponse|JsonResponse
- Modify the active status of the player's character resource in storage.
Methods
__construct()
Class constructor
public
__construct() : mixed
create()
Show the form for creating a new character resource.
public
create() : Response
Return values
Response —inertia response
destroy()
Remove the specified character from storage.
public
destroy(Character $character) : RedirectResponse|JsonResponse
Parameters
- $character : Character
-
character to delete
Return values
RedirectResponse|JsonResponse —redirect response if character is active, otherwise json response on success
index()
Display a listing of the user's character resources.
public
index() : Response
Return values
Response —inertia response
show()
Display the specified character resource.
public
show(Character $character) : Response
Parameters
- $character : Character
-
character to show
Return values
Response —inertia response
store()
Store a user's newly created character resource in storage.
public
store(StoreCharacterRequest $request) : Response|RedirectResponse
Parameters
- $request : StoreCharacterRequest
-
user submitted form response
Return values
Response|RedirectResponse —redirect response on successful creation, otherwise inertia response on max characters reached
update()
Modify the active status of the player's character resource in storage.
public
update(Character $character) : RedirectResponse|JsonResponse
Parameters
- $character : Character
-
character to update active status
Return values
RedirectResponse|JsonResponse —redirect response on character already active, otherwise json response on success