I have installed authentication using
php artisan make:auth
Before and after loggingin menu shows login and Register link appears even user has logged in. I checked the code below and I found it was correct, there may be problem in Auth::guest(). check the code below
@if (Auth::guest())
<li><a href="{{ url('/login') }}">Login</a></li>
<li><a href="{{ url('/register') }}">Register</a></li>
@else
I referred some of the questions and they have given some dirty fix. example below.
Route::group(['middleware' => ['web']], function () {
Route::get('/', 'HomeController@index');
});
Actually what this fix does,is force user to login by showing login page.Actually when the user logged in it should hide and show the user name. When I click on home link, it hides and shows username.