我正在尝试根据角色重定向用户,但是由于某种原因,我无法在PHP标记内添加href
标记。
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Dashboard</div>
<?php if(auth()->user()->isAdmin == 1){?>
<div class="panel-body">
<a href="{{url('admin/routes')}}"> Welcome to the Admin panel!</a>
</div><?php } else echo "<div class='panel-heading'> <a href='{{url(route('blog'))}}'>Normal User</a></div>";?>
</div>
</div>
</div>
</div>
答案 0 :(得分:0)
您可以尝试以下方法在php中创建html链接
#Screen
for /f "eol=- delims=" %%a in (Config.ini) do set "%%a"
CLear
say Hello
pause
或者您也可以尝试此标记
<?php
echo "<a href='https://www.google.com' target='_blank'>Text</a>";
$link = "<a href='https://www.quora.com' target='_blank'>Text</a>";
?>