简体   繁体   中英

How to Use router-link Element in Laravel's Blade

link tag in blade. I can use it in vue like this;

app.vue;

<router-link to="/"><a class="nav-link">Home</a></router-link>

When I want to use in blade like this;

home.blade.php;
 <router-link to="/"><a class="nav-link">Home</a></router-link>

Route is not working. What can I do?

You can use normal a tag, for the href you can pass link or route name for example

<a href="{{ route('home') }}">Home</a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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