Hello,

I wonder why I need to press F5 before entering the admin page after login.

home_admin.blade.php

<form class="navbar-form navbar-right" id="form_login" method="post" style="margin-top: 0;"
                  action="{{ url('/auth/login') }}">
                <input type="hidden" id="_token" name="_token" value="{{ csrf_token() }}">

                <div class="form-group">
                    <span class="control-header">Email</span>
                    <span><input type="text" name="email" placeholder="Email" required
                                 class="form-control"/></span>
                </div>
                <div class="form-group">
                    <span class="control-header">Password</span>
                    <span><input type="password" name="password" placeholder="Password" required
                                 class="form-control"/></span>
                    <input type="hidden" name="domain" required value="{{$domain}}"/>
                </div>
                <div class="form-group">
                    <h3 style="margin-top: 2px;">
                        <button type="submit" id="btn_login"><span class="glyphicon glyphicon-log-in"
                                                                   aria-hidden="true"></span> login
                        </button>
                    </h3>
                </div>
                <br>
                <a href="#" data-toggle="modal" data-target="#forgot_password"
                   style="margin-top: -7px;float: right;margin-right: 90px;font-size: 10px;color: white;">Forgot
                    Password?</a>
            </form>

routes.php

Route::controllers([
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
'home'=>'HomeController',
'member'=>'MemberController',
'mail'=>'MailController',
'social'=>'SocialController',
'ajax'=>'AjaxController',
'api'=>'ApiController',
'timeline'=>'TimelineController',
'setting'=>'SettingController',
 //    'ecommerce'=>'EcommerceController',
'test'=>'TestController',
 ]);

AuthController.php

class AuthController extends Controller
{
/*
|--------------------------------------------------------------------------
| Registration & Login Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users, as well as the
| authentication of existing users. By default, this controller uses
| a simple trait to add these behaviors. Why don't you explore it?
|
*/

use AuthenticatesAndRegistersUsers, ThrottlesLogins;

/**
 * Create a new authentication controller instance.
 *
 * @return void
 */
public function __construct()
{
$this->middleware('guest', ['except' => 'getLogout']);
}

/**
 * Get a validator for an incoming registration request.
 *
 * @param  array  $data
 * @return \Illuminate\Contracts\Validation\Validator
 */
protected function validator(array $data)
{
return Validator::make($data, [
    'name' => 'required|max:255',
    'email' => 'required|email|max:255|unique:users',
    'password' => 'required|confirmed|min:6',
]);
}

/**
 * Create a new user instance after a valid registration.
 *
 * @param  array  $data
 * @return User
 */

protected function create(array $data)
{
return User::create([
    'name' => $data['name'],
    'email' => $data['email'],
    'password' => bcrypt($data['password']),
]);
}
}

PasswordController.php

 class PasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/

use ResetsPasswords;

/**
 * Create a new password controller instance.
 *
 * @return void
 */
public function __construct()
{
    $this->middleware('guest');
}

}

I also wonder if it's using javascript since I cannot find the form_login (id="form_login") anywhere in the file.

What happens right after you login before entering the admin page?
Does it show an auth error, a PHP error, Laravel error, blank page?

You need to provide more details with your questions/problems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.