How to pass route links and image storage links via ajax in controller laravel 8

I’m new to ajax and I’m trying to build a live search box for users list in a chatbox, in order for the design to fit my chatbox I had to make the HTML the same as my template, the results are getting back fine it’s just the link href isn’t working also the users profile picture isn’t found, I tried the traditional URL syntax but it seems not write with ajax , here is my controller search function :