app/API/Strings/Controllers/ApiController.php
/**
     * Handle a request to reverse a string.
     *
     * @param ReverseRequest $request
     * @return \Illuminate\Http\JsonResponse
     */
Handle a request to reverse a string.
Handle a request to reverse a string .
public function reverse(ReverseRequest $request)
    {
        return response()->json([
            'input' => $request->get('input'),
            'output' => strrev($request->get('input'))
        ]);
    }
public function reverse ( ReverseRequest $ request ) { return response ( ) -> json ( [ 'input' => $ request -> get ( 'input' ) , 'output' => strrev ( $ request -> get ( 'input' ) ) ] ) ; }
Handle a request to reverse a string.
Handle a request to reverse a string .