How to write blade syntax in external js

Posted 2 years ago by kirankumar467

Sorry for Typo mistakes.

I have a external js file there i want to use url() function by using blade syntax.

I am doing like below but it's not working

$.ajax({ url:"{!! url('/admin/dashboard/get-survey-details') !!}", method:"GET", data:"", success:function(data) { //console.log(data); var res = data.split('~~'); var dataarr = JSON.parse(res[0]); var dataarr2 = JSON.parse(res[1]); var dataarr4 = JSON.parse(res[3]); //console.log(dataarr); } ...... });

Please sign in or create an account to participate in this conversation.