var product_id = 15; var url = '{{ route("product.edit", ":id") }}'; url = url.replace(':id',product_id);