How to retrieve array of objects sent by Ajax in laravel
I am using Laravel with Vuejs and AXIOS for HTTP requests. I am sending a post request with the array of objects. So in my laravel store function how can I retrieve that data from the $request?
Laravel Store function in controller:
public function store(Request $request)
{
return $request;
}
vue code:
axios.post('/addTest',this.$data.questions).then(response=>{
console.log(response.data);
});
in this code questions is an array of objects.
from Laravel Questions and Answers https://laravelquestions.com/php/how-to-retrieve-array-of-objects-sent-by-ajax-in-laravel/
via Lzo Media
No comments:
Post a Comment