jeudi 12 avril 2018

Auth::check() does't work in errors.404 view

I have created my project in Laravel 5.6 and cant figure why in the errors.404 view the function Auth::check() does not work, while it extends the same "layouts.app" as others views where the function work.

@if (Auth::check())
    <li class="dropdown nav-animate-fadeIn nav-hover-animate hover-animate-bounceIn"><!-- THEMATIC -->
        <a class="dropdown-toggle noicon">

            Welcome 
        </a>
        <ul class="dropdown-menu">
            <li class="dropdown">
                <a  href="">
                    <i class="glyphicon glyphicon-log-in"></i> Profile
                </a>
            </li>
            <li class="dropdown">
                <a  href="">
                    <i class="glyphicon glyphicon-new-window"></i> Logout
                </a>
            </li>
        </ul>
    </li>

@else
    <li class="dropdown nav-animate-fadeIn nav-hover-animate hover-animate-bounceIn"><!-- THEMATIC -->
        <a class="dropdown-toggle noicon">

            <i class="glyphicon glyphicon-user"></i>
        </a>
        <ul class="dropdown-menu">
            <li class="dropdown">
                <a  href="">
                    <i class="glyphicon glyphicon-log-in"></i> LOGIN
                </a>
            </li>
            <li class="dropdown">
                <a  href="">
                    <i class="glyphicon glyphicon-new-window"></i> REGISTER
                </a>
            </li>
        </ul>
    </li>
@endif



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire