Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

pass js var to laravel route

var url = '{{ route("admin.stocks.edit", ":id") }}';
url = url.replace(':id', stock.id);
$('.stocks_list').append('<li><a href="'+url+'">' + stock.symbol + ' </a></li>');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pass #js #var #laravel #route
ADD COMMENT
Topic
Name
7+6 =