如果我不使用刀片或任何模板,如何通过使用href标记重定向到laravel 5中的路由? [英] How to redirect to a route in laravel 5 by using href tag if I'm not using blade or any template?
本文介绍了如果我不使用刀片或任何模板,如何通过使用href标记重定向到laravel 5中的路由?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Route::get('/page','UserController@view page');
是我的路线.
我有一个带有href标记的列表,我想重定向到此路由.
I have a list with href tag and I want to redirect to this route.
<ul>
<li><a href="">how it works</a></li>
</ul>
我没有使用刀片或任何其他模板.
I am not using blade or any other templates.
推荐答案
在您的应用配置文件中,将url
更改为localhost/example/public
In you app config file change the url
to localhost/example/public
然后,当您要链接到某个内容时
Then when you want to link to something
<a href="{{ url('page') }}">Some Text</a>
没有刀片
<a href="<?php echo url('page') ?>">Some Text</a>
这篇关于如果我不使用刀片或任何模板,如何通过使用href标记重定向到laravel 5中的路由?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文