1
我使用laravel 5.2,我想改變菜單登錄退出時,用戶登錄,但 但如下圖所示enter image description here改變菜單的登錄與註銷laravel 5.2
的結果,這是我的代碼
<div id="headerweb">
<div class="wrapper">
<a href="/" class="mainlogo" target="_self"><img src="<?=asset('public/images/mainlogo.png')?>" alt=""/></a>
<div class="mainmenu">
<ul>
<li><a href="carakerja" target="_self">CARA KERJA</a> </li>
<li><a href="order/pemeriksaan" target="_self">ORDER TES LAB</a> </li>
<li><a href="hasil" target="_self">HASIL LAB ONLINE</a> </li>
<li><a href="lokasilab" target="_self">LOKASI LAB</a> </li>
<li><a href="#">BLOG</a> </li>
@if (Auth::guest())
<li><a href="login" target="_self">LOGIN</a> </li>
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
{{ Auth::user()->name }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ url('/logout') }}"><i class="fa fa-btn fa-sign-out"></i>Logout</a></li>
</ul>
@endif
</ul>
</div>
</div>
</div><!-- endheaderweb -->
任何一個幫助我?
更改文件名文件名.blade.php,這是不接受你的刀片語法 – codeGig
@AlexeyMezenin我不得不補充,但只是相同 –
我已經改變了,但只是相同@Jitendra –