I would like to get the position object sent to php.
html:
onclick="name(event)">
js:
function name(e)
{
$.ajax({
url: '/...',
type: 'post',
data: {'x': JSON.stringify(e)}
});
}
php:
json_decode($request['x'])->pageX; // doesn't work
How can I read the position of this object? I use laravel.