Ookma-Kyi Core

DuelController extends Controller
in package

Table of Contents

Methods

__construct()  : mixed
Class constructor
create()  : Response
Show the form for creating a new duel resource.
destroy()  : RedirectResponse|JsonResponse
Remove the specified duel resource from storage.
edit()  : Response
The opponent accepted, show the form for editing the Duel resource.
index()  : Response
Display a listing of the user's characters' duel resources.
show()  : Response
Display the specified completed duel resource.
store()  : RedirectResponse
Store a user's newly created duel resource in storage.
update()  : Response|RedirectResponse
Update the specified resource in storage. In this case the opponent has accepted the duel and responded with their own moves

Methods

create()

Show the form for creating a new duel resource.

public create() : Response
Return values
Response

inertia response

destroy()

Remove the specified duel resource from storage.

public destroy(Duel $duel) : RedirectResponse|JsonResponse
Parameters
$duel : Duel

duel to delete

Return values
RedirectResponse|JsonResponse

redirect response if duel is open, otherwise json response on success

edit()

The opponent accepted, show the form for editing the Duel resource.

public edit(Duel $duel) : Response

In this case the opponent simply chooses his/her moves and the duel status is updated

Parameters
$duel : Duel

duel to edit

Return values
Response

inertia response

index()

Display a listing of the user's characters' duel resources.

public index() : Response
Return values
Response

inertia response

show()

Display the specified completed duel resource.

public show(Duel $duel) : Response
Parameters
$duel : Duel

the completed duel to show

Return values
Response

inertia response

store()

Store a user's newly created duel resource in storage.

public store(StoreDuelRequest $request) : RedirectResponse
Parameters
$request : StoreDuelRequest

user submitted form response

Return values
RedirectResponse

redirect response on successful creation

update()

Update the specified resource in storage. In this case the opponent has accepted the duel and responded with their own moves

public update(UpdateDuelRequest $request, Duel $duel) : Response|RedirectResponse
Parameters
$request : UpdateDuelRequest

user submitted form response

$duel : Duel

duel to update

Return values
Response|RedirectResponse

inertia response if no active characters or the duel is already completed, otherwise redirect response on success


        
On this page

Search results