app/Http/Controllers/GameTurnController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(TurnRequest $request, CreateTurnService $createTurnService, int $gameId)
    {
        $data = $createTurnService->setGameById($gameId)
        ->setUser($request->user())
        ->create($request->only(['side', 'tile_id']));
        return new TurnResource($data);
    }
public function store ( TurnRequest $ request , CreateTurnService $ createTurnService , int $ gameId ) { $ data = $ createTurnService -> setGameById ( $ gameId ) -> setUser ( $ request -> user ( ) ) -> create ( $ request -> only ( [ 'side' , 'tile_id' ] ) ) ; return new TurnResource ( $ data ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .