vendredi 27 mai 2016

Laravel 5.0 multi-auth Auth::guest() now working

Am bulding a church system for a two collages which allows two different users from each collage which are knust and legon. They both have two different databases. I have the same code in each of their master.blade.php like the one below. The system will drop am modal if you are a guest and will hide it if you login. legon users are able to login and out successfully but that of knust logs in successfully but still shows the modal.

 @if(Auth::guest())
{!! Form::open(['url'=>'knust-signin', 'method'=>'POST']) !!}
<div class="modal fade bootstrapmodal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h3>Are You An Executive Member ? Sign In</h3>
                </div>
                             <div class="modal-body">
            <div class="">
            <label for="username">Username:</label>
            <div class="input-group"><span class="input-group-addon"><i class="fa fa-user fa-fw"></i></span>
        <input class="input form-control" type="text" name="username"  placeholder="Username" value="" required>
        </div>

            @if ($errors->has('username'))
        <span style="color:#b84464;">Sorry, the<strong> username</strong> and                      <strong>password</strong> must match !</span>
            @endif
        </div>


        <p><div class="">
            <label for="password">Password:</label>
            <div class="input-group"><span class="input-group-addon"><i class="fa fa-key fa-fw"></i></span>
            <input class="input form-control" type="password" name="password" placeholder="Password" value="" required>
        </div>
                    </p>



                @if ($errors->has('password'))
                  <span style="color:#b84464;"></span>
                  @endif
            </div>

            <div class="form-group">
                <label for="remember"></label>
                {!! Form::checkbox('remember', 'remember') !!} Remember Me

            <p style="padding-top: 5px;"><a href="">Forgot Your Password?</a></p>
                     </div>
                </div>
                {!! Form::token() !!}

                  <div class="modal-footer">
                <button class="btn btn-primary" type="submit" value="Sign In">Sign In<i class="fa fa-sign-in fa-fw fa-lg"></i></button>
                   </div>
                </div>
             </div>
              </div>
        {!! Form::close() !!}
    @endif



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/20JXThp
via IFTTT

Aucun commentaire:

Enregistrer un commentaire