HTML PHP pass the decoded link in the variable

131 Views Asked by At

I'm working on a project and hope someone can help me.

I build a tool in Laravel which generates sales invoices and I would like to pass the link to the related document in the invoice. The thing is, that I don't have an access to the invoice layout, It's an existing program, I use API to pass the data. I can pass the link sort of "https://mySite/myFiles/667777.pdf" and it's clickable. But it doesn't look pretty in the document. I would like the customer do not see all the path, but have only smthg like 'click me'. My question is, how to send

 <a href='https://mySite/myFiles/667777.pdf'>click me</a> 

via API to receive clickable 'click me'?

I tried html_entity_decode, but it doesn't work. Will appreciate any suggestions

    $orig = "<a href='/'> click here </a>";
    $conv = html_entity_decode($orig);

    dd($conv); returns "<a href='/'> click here </a>"
0

There are 0 best solutions below