我有数据表在laravel 8和我是编码一个表得到一些属性,代码像这样Controller
我想调用r.file来获取访问文件路径的值,路径文件如下=“assets/file/Dr3cxy0QM2GDH1IpaWeiMZDUXfTVhl6QkazEyKYh.pdf”
Blade View
但结果是Browser
如何使href值像这样?<a href="/storage/assets/file/Dr3cxy0QM2GDH1IpaWeiMZDUXfTVhl6QkazEyKYh.pdf">Test.pdf</a>
1条答案
按热度按时间6jygbczu1#
You can use the jQuery
.data()
method to store the data in an HTML element and then access the data using the.data()
method in the jQuery selector.For example, if you have an HTML element with a class of
storage-url
and you want to store a variable called "url" in it, you could do the following:Then, in your jQuery code, you can access the data using the
.data()
method: