I'm building Notification using Pusher, and I receive 'route' to some page as a JavaScript variable
Now I want to inject this variable to the Notification bar as a link to some page determined in the variable, I try to make href and put the the route in it using laravel url method to access it from any page. here's the code
channel.bind('App\\Events\\Councilcreated', function (data) {
var a = document.createElement('a');
a.setAttribute("href", "{{ url(".data.page.") }}");
});
the Problem is that printed (data.page) as string not as the value of the (data.page) variable
pagein your event class?