1

I get a response in my routes.php, this response is a JSON, this is my code:

Route::post('/prueba', function(){
     if(Request::ajax()){    
    echo Response::json(Request::all());       
    }
 });

When I make an echo from this I get all this in my console:

enter image description here

What I need to get just the value from auction_price for example?

1 Answer 1

2

try this

Route::post('/prueba', function(){
 if(Request::ajax()){    
echo Response::json(Request::get('auction_price'));       
}
});
Sign up to request clarification or add additional context in comments.

2 Comments

This !, Thanks, I was trying with this: Response::json(Request::only('auction_price')); thanks !!!
if this helps you,make it accepted,it will helpfull for another

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.