我有數據庫結構是怎樣的書&下載鏈接..如何把URL裏面laravel刀片
$book= new Book();
$book->name = $request->Input(['name']);
$book->download_link = $request->Input(['download_link']); // eg. https://bnbooks.com/1234
$book->save();
現在
,如果我想給這片頁..like下載link..how做我把在href
標記中,以便將用戶重定向到該頁面?
<a href="{{URL::to($book->download_link)}}">{{$book->name}}</a>
// This doesn't work
'網址::以()'添加基本URL,所以如果你已經下載鏈接添加整個路徑,然後只需添加像'HREF =「{{$書本 - > DOWNLOAD_LINK}} 「' –