Your home controller is protected with auth middleware thats why it getting redirected to login page now you have two options.
Remove auth middleware from homecontroller
class HomeController extends Controller
{
// public function __construct()
// {
// $this->middleware('auth');
// }
public function index()
{
return view('home');
}
}
Or Show your home page directly from route file
Route::get('/', function(){
return view('home');
}
Route::get('logout', function() {
Auth::logout();
return redirect('/');
});
Auth::routes();