I have defined a jQuery variable
var user_id = parseInt($(this).attr('id').replace(/[^\d]/g, ''));
and i want to get the user name like this:
alert({!! \App\User::findOrFail(user_id)->name !!});
Is this even possible?
i get this error:
How can i get the user name through jQuery variable??
via lewis4u