vendredi 29 décembre 2017

trying to get property of non-object multi-auth

I use Hesto/multi-auth package. The username when I login success default redirect in customer.layout.auth, how can I to redirect in my blade, Example: welcome.blade.php, I can't use in another blade, it error Trying to get property of non-object . How to fix it, please help me !

AppServiceProvider.php

       public function register()
        {
            //
                if ($this->app->environment() == 'local') {
                 $this->app->register('Hesto\MultiAuth\MultiAuthServiceProvider');
                }
        }

auth.blade.php



 @if (Auth::guest())
                            <li><a href="">Login</a></li>
                            <li><a href="">Register</a></li>
                        @else
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                                     <span class="caret"></span>
                                </a>

                                <ul class="dropdown-menu" role="menu">
                                    <li>
                                        <a href=""
                                            onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                            Logout
                                        </a>

                                        <form id="logout-form" action="" method="POST" style="display: none;">
                                            
                                        </form>
                                    </li>
                                </ul>
                            </li>
                        @endif



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire