简体   繁体   English

将href更改为laravel锚标记

[英]Changing a href to laravel anchor tag

Here is my regular code in the blade 这是刀片中的常规代码

<a href="<?php echo url();?>/blog/<?php echo $Blog->id;?>">{{ $Blog->BlogTitle }}</a>

I want to do something like 我想做类似的事情

{{ HTML::link('http://test.com', null, array('id' => 'linkid'))}}

I mean i want to do it in the laravel way.. 我的意思是我想以幼虫的方式做。

How can i do this ? 我怎样才能做到这一点 ?

试试下面的代码

{{ HTML::link(url().'/blog'.$Blog->id, $Blog->BlogTitle)}}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM