public function respondsWithSuccess(string $message, string $redirectTo = '')
    {
        return response()->json([
            'redirectTo' => $redirectTo,
            'callback' => $redirectTo,
            'message' => $message,
            'success' => true,
        ], 200);
    }
public function respondsWithSuccess(string $message, string $redirectTo = '')
    {
        return response()->json([
            'redirectTo' => $redirectTo,
            'callback' => $redirectTo,
            'message' => $message,
            'success' => true,
        ], 200);
    }
public function respondsWithSuccess ( string $ message , string $ redirectTo = '' ) { return response ( ) -> json ( [ 'redirectTo' => $ redirectTo , 'callback' => $ redirectTo , 'message' => $ message , 'success' => true , ] , 200 ) ; }
Return a success JSON response.

@param  string $message
@param  string $redirectTo

@return JSON
Return a success JSON response .